{"id":"CVE-2022-39299","published":"2022-10-12T00:00:00Z","modified":"2025-04-23T16:51:09Z","title":"Signature bypass via multiple root elements in Passport-SAML","vendor":"node-saml","product":"passport-saml","tier":"tail","description":{"text":"Passport-SAML is a SAML 2.0 authentication provider for Passport, the Node.js authentication library. A 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. Users should upgrade to passport-saml version 3.2.2 or newer. The issue was also present in the beta releases of `node-saml` before version 4.0.0-beta.5. If you cannot upgrade, disabling SAML authentication may be done as a workaround.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.04494,"percentile":0.91706,"provenance":"source"},"cwes":[{"id":"CWE-347","name":"Improper Verification of Cryptographic Signature"}],"references":[{"url":"https://github.com/node-saml/passport-saml/security/advisories/GHSA-m974-647v-whv7","tags":[]},{"url":"https://github.com/node-saml/passport-saml/commit/8b7e3f5a91c8e5ac7e890a0c90bc7491ce33155e","tags":[]},{"url":"http://packetstormsecurity.com/files/169826/Node-saml-Root-Element-Signature-Bypass.html","tags":[]}],"priority":{"score":28.5,"factors":[{"name":"EPSS percentile","points":18.34},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.18}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2022-10-31","earliestUrl":"https://github.com/doyensec/CVE-2022-39299_PoC_Generator","repos":[{"name":"doyensec/CVE-2022-39299_PoC_Generator","url":"https://github.com/doyensec/CVE-2022-39299_PoC_Generator","stars":19,"created":"2022-10-31"}]},"first":{"date":"2022-10-31","source":"PoC-in-GitHub","url":"https://github.com/doyensec/CVE-2022-39299_PoC_Generator"},"provenance":"source"},"vendorSlug":"node-saml","affectedVersions":[{"vendor":"node-saml","product":"passport-saml","versions":["< 3.2.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-04-23T15:48:05.050108Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"passport-saml","vulnerableRanges":["<3.2.2"],"patched":["3.2.2"],"from":["GHSA-m974-647v-whv7"],"provenance":"source"},{"ecosystem":"npm","package":"node-saml","vulnerableRanges":["<4.0.0-beta.5"],"patched":["4.0.0-beta.5"],"from":["GHSA-m974-647v-whv7"],"provenance":"source"},{"ecosystem":"npm","package":"@node-saml/node-saml","vulnerableRanges":["<4.0.0-beta.5"],"patched":["4.0.0-beta.5"],"from":["GHSA-m974-647v-whv7"],"provenance":"source"},{"ecosystem":"npm","package":"@node-saml/passport-saml","vulnerableRanges":["<4.0.0-beta.3"],"patched":["4.0.0-beta.3"],"from":["GHSA-m974-647v-whv7"],"provenance":"source"}],"summary":{"text":"A signature-verification flaw in passport-saml, the SAML 2.0 authentication provider for Passport (Node.js), lets authentication be bypassed on websites that use it, caused by improper verification of cryptographic signatures when a document contains multiple root elements. An attacker needs to possess an arbitrary XML element signed by the identity provider over the network without authentication or user interaction, and in some IdP configurations, fully unauthenticated attacks may also be possible if a signed message can be triggered.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:29:03Z"},"euvd":{"id":"EUVD-2022-7124","exploited":false,"provenance":"source"},"exploitRefs":["http://packetstormsecurity.com/files/169826/Node-saml-Root-Element-Signature-Bypass.html"],"lineage":{"familyId":"fam-node-saml-passport-saml-cve-2021-39171","parents":[{"from":"CVE-2021-39171","to":"CVE-2022-39299","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:passport-saml","fromFixed":"3.1.0","toFixed":"3.2.2","daysApart":411},{"kind":"same-code","provenance":"machine","files":["src/node-saml/saml.ts"],"commits":["https://github.com/node-saml/passport-saml/commit/f1e00b64c21a725f545e675cd810bbaa435a3972","https://github.com/node-saml/passport-saml/commit/8b7e3f5a91c8e5ac7e890a0c90bc7491ce33155e"],"basis":"shared function","functions":["SAML"]}]}],"packageHistory":[{"cve":"CVE-2022-39299","published":"2022-10-12","fixed":"4.0.0-beta.5","kev":false},{"cve":"CVE-2023-40178","published":"2023-08-23","fixed":"4.0.5","kev":false,"link":{"from":"CVE-2022-39299","to":"CVE-2023-40178","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@node-saml/node-saml","fromFixed":"4.0.0-beta.5","toFixed":"4.0.5","daysApart":315}]}},{"cve":"CVE-2025-54369","published":"2025-12-12","fixed":"5.1.0","kev":false},{"cve":"CVE-2025-54419","published":"2025-07-28","fixed":"5.1.0","kev":false}],"package":"npm:@node-saml/node-saml"}}