CVE-2017-11429: Saml2 js Authentication Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-5p5w-j3g7-w4wv
CVSS 7.7
CWE-287
Published
Advisory Summary

CVE-2017-11429 is a MODERATE (CVSS 7.7) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Saml2 js libraries in the npm ecosystem. The issue involves authentication bypass via incorrect xml canonicalization and dom traversal in saml2-js. Remediation is available by upgrading affected packages to version 1.12.4, 2.0.2.

CVE-2017-11429 at a Glance

CVE Identifier CVE-2017-11429
GHSA Identifier GHSA-5p5w-j3g7-w4wv
Severity MODERATE
CVSS v3.1 Base Score 7.7
CWE Classification CWE-287: Improper Authentication
Affected Product Saml2 js
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2017-11429

To remediate this vulnerability, upgrade all affected Saml2 js dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

saml2-js fixed: 1.12.4
npm install saml2-js@1.12.4
saml2-js fixed: 2.0.2
npm install saml2-js@2.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls saml2-js

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2017-11429, inspect your project dependencies using npm:

npm ls saml2-js

Analyze the terminal output to locate any version of Saml2 js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.12.4), your application is affected.

Note: The npm ls saml2-js command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Saml2 js, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Versions of `saml2-js` prior to 1.12.4 or 2.0.2 are vulnerable to authentication bypass. The `saml2-js` library may incorrectly utilize 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. 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 ## Recommendation If you use 1.x upgrade to version 1.12.4 or greater If you use 2.x upgrade to version 2.02 or greater

CVE-2017-11429 Affected Saml2 js Versions

2 component(s)
Fixed Versions:
1.12.42.0.2
Product / Package Ecosystem Affected Versions Fixed Version
saml2-js
npm
< 1.12.4
1.12.4
saml2-js
npm
≥ 2.0.0
< 2.0.2
2.0.2

References

Frequently Asked Questions

What is CVE-2017-11429?
CVE-2017-11429 is a security vulnerability in Saml2 js involving Authentication bypass via incorrect XML canonicalization and DOM traversal in saml2-js under CWE-287: Improper Authentication.
Which Saml2 js versions are affected?
Affected versions include releases prior to 1.12.4, 2.0.2 across affected packages: saml2-js.
What version fixes CVE-2017-11429?
Upgrading to 1.12.4, 2.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is saml2-js affected?
Yes, saml2-js is affected in releases prior to 1.12.4, 2.0.2. Upgrade your dependency to 1.12.4, 2.0.2 or later.
What is the CVSS score of CVE-2017-11429?
CVE-2017-11429 has a CVSS v3.1 base score of 7.7 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2017-11429?
CVE-2017-11429 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2017-11429?
Run the dependency tree command: 'npm ls saml2-js'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5p5w-j3g7-w4wv",
  "modified" : "2021-06-11T14:24:18Z",
  "published" : "2019-07-05T21:11:18Z",
  "aliases" : [ "CVE-2017-11429" ],
  "summary" : "Authentication bypass via incorrect XML canonicalization and DOM traversal in saml2-js",
  "details" : "Versions of `saml2-js` prior to 1.12.4 or 2.0.2 are vulnerable to authentication bypass.\n\nThe `saml2-js` library may incorrectly utilize 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.\n\nSecurity 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.\n\nSome 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.\n\nA 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\n\n\n## Recommendation\n\nIf you use 1.x upgrade to version 1.12.4 or greater \nIf you use 2.x upgrade to version 2.02 or greater",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "saml2-js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.12.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "saml2-js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-11429"
  }, {
    "type" : "WEB",
    "url" : "https://duo.com/blog/duo-finds-saml-vulnerabilities-affecting-multiple-implementations"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-5p5w-j3g7-w4wv"
  }, {
    "type" : "WEB",
    "url" : "https://www.kb.cert.org/vuls/id/475445"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/567"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:16:53Z",
    "nvd_published_at" : null
  }
}