CVE-2017-1000452: Samlify Authentication Bypass Vulnerability
HIGHCVE-2017-1000452 is a HIGH (CVSS 7.5) authentication bypass vulnerability (CWE-91: XML Injection (aka Blind XPath Injection)) affecting Samlify libraries in the npm ecosystem. The issue involves samlify vulnerable to authentication bypass by allowing tokens to be reused with different usernames. Remediation is available by upgrading affected packages to version 2.4.0-rc5.
CVE-2017-1000452 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-1000452
To remediate this vulnerability, upgrade all affected Samlify dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install samlify@2.4.0-rc5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls samlify
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2017-1000452, inspect your project dependencies using npm:
npm ls samlify
Analyze the terminal output to locate any version of Samlify in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.0-rc5), your application is affected.
Note: The npm ls samlify 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-91: XML Injection (aka Blind XPath Injection), where the product does not properly neutralize special elements that are used in xml, allowing attackers to modify the syntax, content, or commands of the xml before it is processed by an end system. In Samlify, 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
CVE-2017-1000452 Affected Samlify Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
samlify
|
npm |
< 2.4.0-rc5
|
2.4.0-rc5
|
References
Frequently Asked Questions
What is CVE-2017-1000452?
Which Samlify versions are affected?
What version fixes CVE-2017-1000452?
Is samlify affected?
What is the CVSS score of CVE-2017-1000452?
What CWE is associated with CVE-2017-1000452?
How can I check npm dependencies for CVE-2017-1000452?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8jjf-w7j6-323c",
"modified" : "2023-08-18T21:00:53Z",
"published" : "2018-01-04T21:03:33Z",
"aliases" : [ "CVE-2017-1000452" ],
"summary" : "Samlify vulnerable to Authentication Bypass by allowing tokens to be reused with different usernames",
"details" : "Versions of `samlify` prior to 2.4.0-rc5 are vulnerable to Authentication Bypass. The package fails to prevent XML Signature Wrapping, allowing tokens to be reused with different usernames. 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.\n\n\n## Recommendation\n\nUpgrade to version 2.4.0-rc5 or later",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "samlify"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.4.0-rc5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1000452"
}, {
"type" : "WEB",
"url" : "https://github.com/tngan/samlify/commit/d382bbc7c6b8ea889839ae1f178730c25b09eb42"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/356284"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tngan/samlify"
}, {
"type" : "WEB",
"url" : "https://github.com/tngan/samlify/compare/v2.4.0-rc4...v2.4.0-rc5"
}, {
"type" : "WEB",
"url" : "https://github.com/tngan/samlify/releases/tag/v2.4.0-rc5"
}, {
"type" : "WEB",
"url" : "https://www.whitehats.nl/blog/xml-signature-wrapping-samlify"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347", "CWE-91" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:25:47Z",
"nvd_published_at" : null
}
}