{"answers":{"affected":"8 open source packages ship an affected version, including @node-saml/passport-saml, @node-saml/node-saml and node-saml. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-39299 in the wild and no public exploit code.","fix":"Upgrade @node-saml/passport-saml to 4.0.0-beta.3 or later.","what":"CVE-2022-39299 is a high-severity authentication bypass vulnerability in node-saml passport-saml, published on 12 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-39299 and fix it if it is affected.\n\nWhat it is: CVE-2022-39299 is a high-severity authentication bypass vulnerability in node-saml passport-saml, published on 12 Oct 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-39299 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @node-saml/passport-saml (npm): affected all versions; fixed in 4.0.0-beta.3\n- @node-saml/passport-saml (npm): affected all versions; fixed in 4.0.0-beta.3\n- @node-saml/node-saml (npm): affected all versions; fixed in 4.0.0-beta.5\n- @node-saml/node-saml (npm): affected all versions; fixed in 4.0.0-beta.5\n- node-saml (npm): affected all versions; fixed in 4.0.0-beta.5\n- node-saml (npm): affected all versions; fixed in 4.0.0-beta.5\n- passport-saml (npm): affected all versions; fixed in 3.2.2\n- passport-saml (npm): affected all versions; fixed in 3.2.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-39299/ (Markdown: https://insights.sbomify.com/CVE-2022-39299/index.md)","id":"CVE-2022-39299","markdown":"https://insights.sbomify.com/CVE-2022-39299/index.md","name":"CVE-2022-39299","record":{"aliases":["GHSA-m974-647v-whv7"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js SAML library","requires_auth":"none","summary":"Remote attackers can bypass SAML authentication in Passport-SAML by exploiting signature validation flaws involving multiple root elements.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"passport-saml","vendor":"passport-saml_project"}],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-347","name":"Improper Verification of Cryptographic Signature"}],"description":"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":"2022-10-31","github_poc":1,"max_poc_stars":19,"metasploit":0,"nuclei":0,"refs":[{"date":"2022-10-31T13:24:34Z","kind":"github_poc","ref":"https://github.com/doyensec/CVE-2022-39299_PoC_Generator","stars":19,"title":"A Simple CVE-2022-39299 PoC exploit generator to bypass authentication in SAML SSO Integrations using vulnerable versions of passport-saml"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Signature bypass via multiple root elements in Passport-SAML","id":"CVE-2022-39299","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"auth_bypass","year":"2022"},"n_packages":8,"n_references":3,"next":{"headline":"Signature bypass via multiple root elements in node-SAML","id":"CVE-2022-39300"},"packages":[{"ecosystem":"npm","fixed":["4.0.0-beta.5"],"introduced":["0"],"last_affected":[],"package":"@node-saml/node-saml","purl":null,"source":"GHSA-m974-647v-whv7"},{"ecosystem":"npm","fixed":["4.0.0-beta.5"],"introduced":["0"],"last_affected":[],"package":"@node-saml/node-saml","purl":"pkg:npm/%40node-saml/node-saml","source":"GHSA-m974-647v-whv7"},{"ecosystem":"npm","fixed":["4.0.0-beta.3"],"introduced":["0"],"last_affected":[],"package":"@node-saml/passport-saml","purl":null,"source":"GHSA-m974-647v-whv7"},{"ecosystem":"npm","fixed":["4.0.0-beta.3"],"introduced":["0"],"last_affected":[],"package":"@node-saml/passport-saml","purl":"pkg:npm/%40node-saml/passport-saml","source":"GHSA-m974-647v-whv7"},{"ecosystem":"npm","fixed":["4.0.0-beta.5"],"introduced":["0"],"last_affected":[],"package":"node-saml","purl":null,"source":"GHSA-m974-647v-whv7"},{"ecosystem":"npm","fixed":["4.0.0-beta.5"],"introduced":["0"],"last_affected":[],"package":"node-saml","purl":"pkg:npm/node-saml","source":"GHSA-m974-647v-whv7"},{"ecosystem":"npm","fixed":["3.2.2"],"introduced":["0"],"last_affected":[],"package":"passport-saml","purl":null,"source":"GHSA-m974-647v-whv7"},{"ecosystem":"npm","fixed":["3.2.2"],"introduced":["0"],"last_affected":[],"package":"passport-saml","purl":"pkg:npm/passport-saml","source":"GHSA-m974-647v-whv7"}],"prev":{"headline":"Deserialization of untrusted data in MelisFront","id":"CVE-2022-39298"},"products":["passport-saml"],"published":"2022-10-12","related":[{"cvss_score":5.3,"headline":"Unlimited transforms allowed for signed nodes","id":"CVE-2021-39171","kev_date_added":null,"published":"2021-08-27"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["node-saml"]},"summary":"Remote attackers can bypass SAML authentication in Passport-SAML by exploiting signature validation flaws involving multiple root elements.","url":"https://insights.sbomify.com/CVE-2022-39299/"}