CVE-2022-39300: Node saml Signature Bypass Vulnerability
HIGHCVE-2022-39300 is a HIGH (CVSS 8.1) signature bypass vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Node saml libraries in the npm ecosystem. The issue involves signature bypass via multiple root elements. Remediation is available by upgrading affected packages to version 4.0.0-beta.5.
CVE-2022-39300 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-39300
To remediate this vulnerability, upgrade all affected Node 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 node-saml@4.0.0-beta.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls node-saml
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-39300, inspect your project dependencies using npm:
npm ls node-saml
Analyze the terminal output to locate any version of Node saml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0-beta.5), your application is affected.
Note: The npm ls node-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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. In Node 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-2022-39300 Affected Node saml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
node-saml
|
npm |
< 4.0.0-beta.5
|
4.0.0-beta.5
|
References
Frequently Asked Questions
What is CVE-2022-39300?
Which Node saml versions are affected?
What version fixes CVE-2022-39300?
Is node-saml affected?
What is the CVSS score of CVE-2022-39300?
What CWE is associated with CVE-2022-39300?
How can I check npm dependencies for CVE-2022-39300?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5p8w-2mvw-38pv",
"modified" : "2022-10-14T19:48:04Z",
"published" : "2022-10-12T22:05:44Z",
"aliases" : [ "CVE-2022-39300" ],
"summary" : "Signature bypass via multiple root elements",
"details" : "### Impact\n\nA remote attacker may be able to bypass SAML authentication on a website using passport-saml. A successful attack requires that the attacker is in possession of an arbitrary IDP signed XML element. Depending on the IDP used, fully unauthenticated attacks (e.g without access to a valid user) might also be feasible if generation of a signed message can be triggered.\n\n### Patches\n\nUsers should upgrade to node-saml v4.0.0-beta5 or newer. \n\n### Workarounds\n\nDisable SAML authentication.\n\n### References\n_Are there any links users can visit to find out more?_\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open a discussion in the [node-saml repo](https://github.com/node-saml/node-saml/discussions)\n\n### Credits\n\n* Felix Wilhelm of Google Project Zero\n\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "node-saml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.0.0-beta.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/node-saml/node-saml/security/advisories/GHSA-5p8w-2mvw-38pv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39300"
}, {
"type" : "WEB",
"url" : "https://github.com/node-saml/node-saml/commit/c1f275c289c01921e58f5c70ce0fdbc5287e5fbe"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/node-saml/node-saml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-10-12T22:05:44Z",
"nvd_published_at" : "2022-10-13T22:15:00Z"
}
}