Authentication Bypass Affecting ruby-saml package, versions <1.6.2


0.0
medium

Snyk CVSS

    Attack Complexity High
    Scope Changed
    Confidentiality High

    Threat Intelligence

    EPSS 1.06% (84th percentile)
Expand this section
NVD
9.8 critical

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-RUBY-RUBYSAML-22020
  • published 28 Feb 2018
  • disclosed 27 Feb 2018
  • credit Kelby Ludwig

How to fix?

Upgrade ruby-saml to version 1.7.0 or higher.

Overview

ruby-saml is a SAML toolkit for Ruby on Rails.

Affected versions of this package are vulnerable to Authentication Bypass. It incorrectly utilizes the results of XML DOM traversal and canonicalization APIs in such a way that an attacker may be able to manipulate the SAML data without invalidating the cryptographic signature, allowing the attack to potentially bypass authentication to SAML service providers.

Details

Security Assertion Markup Language (SAML) is an XML-based markup language for security assertions regarding authentication and permissions, most commonly used for single sign-on (SSO) services.

Some XML DOM traversal and canonicalization APIs may be inconsistent in handling of comments within XML nodes. Incorrect use of these APIs by some SAML libraries results in incorrect parsing of the inner text of XML nodes such that any inner text after the comment is lost prior to cryptographically signing the SAML message. Text after the comment therefore has no impact on the signature on the SAML message.

A remote attacker can modify SAML content for a SAML service provider without invalidating the cryptographic signature, which may allow attackers to bypass primary authentication for the affected SAML service provider.