CVE-2022-39299 Signature bypass via multiple root elements in Passport-SAML
Remote attackers can bypass SAML authentication in Passport-SAML by exploiting signature validation flaws involving multiple root elements.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-39299?
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.
Official 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.
Weakness: CWE-347
Which versions are affected by CVE-2022-39299?
8 open source packages ship an affected version, including @node-saml/passport-saml, @node-saml/node-saml and node-saml. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@node-saml/passport-saml npm | All versions | 4.0.0-beta.3 |
@node-saml/passport-saml npm | All versions | 4.0.0-beta.3 |
@node-saml/node-saml npm | All versions | 4.0.0-beta.5 |
@node-saml/node-saml npm | All versions | 4.0.0-beta.5 |
node-saml npm | All versions | 4.0.0-beta.5 |
node-saml npm | All versions | 4.0.0-beta.5 |
2 more packages
passport-saml npm | All versions | 3.2.2 |
passport-saml npm | All versions | 3.2.2 |
Products include Passport-Saml Project Passport-Saml.
How do I fix CVE-2022-39299?
Upgrade @node-saml/passport-saml to 4.0.0-beta.3 or later.
Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.
Is CVE-2022-39299 being exploited?
There is no known exploitation of CVE-2022-39299 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in node-saml passport-saml
Sources
Also known as GHSA-m974-647v-whv7.