CVE-2021-39171: Passport saml Unlimited Transforms Allowed For Signed Vulnerability
MODERATECVE-2021-39171 is a MODERATE (CVSS 5.3) unlimited transforms allowed for signed vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Passport saml libraries in the npm ecosystem. The issue involves unlimited transforms allowed for signed nodes. Remediation is available by upgrading affected packages to version 3.1.0.
CVE-2021-39171 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2021-39171
To remediate this vulnerability, upgrade all affected Passport saml 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 passport-saml@3.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls passport-saml
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-39171, inspect your project dependencies using npm:
npm ls passport-saml
Analyze the terminal output to locate any version of Passport saml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.0), your application is affected.
Note: The npm ls passport-saml 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Passport saml, 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-2021-39171 Affected Passport saml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
passport-saml
|
npm |
< 3.1.0
|
3.1.0
|
References
Frequently Asked Questions
What is CVE-2021-39171?
Which Passport saml versions are affected?
What version fixes CVE-2021-39171?
Is passport-saml affected?
What is the CVSS score of CVE-2021-39171?
What CWE is associated with CVE-2021-39171?
How can I check npm dependencies for CVE-2021-39171?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5379-r78w-42h2",
"modified" : "2024-02-10T00:55:45Z",
"published" : "2021-08-30T16:11:57Z",
"aliases" : [ "CVE-2021-39171" ],
"summary" : "Unlimited transforms allowed for signed nodes",
"details" : "### Impact\nA malicious SAML payload can require transforms that consume significant system resources to process, thereby resulting in reduced or denied service. This would be an effective way to perform a denial-of-service attack.\n\n### Patches\nThis has been resolved in version 3.1.0. The resolution is to limit the number of allowable transforms to 2.\n\n### References\nhttps://github.com/node-saml/passport-saml/pull/595\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "passport-saml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/node-saml/passport-saml/security/advisories/GHSA-5379-r78w-42h2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-39171"
}, {
"type" : "WEB",
"url" : "https://github.com/node-saml/passport-saml/pull/595"
}, {
"type" : "WEB",
"url" : "https://github.com/node-saml/passport-saml/commit/f1e00b64c21a725f545e675cd810bbaa435a3972"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/node-saml/passport-saml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-27T23:25:28Z",
"nvd_published_at" : "2021-08-27T22:15:00Z"
}
}