CVE-2025-54419: Node-SAML SAML Signature Verification Vulnerability
Node-SAML loads the assertion from the (unsigned) original response document. This is different than the parts that are verified when checking signature. This allows an attacker to modify authentication details within a valid SAML assertion. For example, in one attack it is possible to remove any character from the SAML assertion username.
Published Jul 28, 2025 · Updated Aug 8, 2025
Affected packages
@node-saml/node-saml
- Ecosystem
- npm
- Affected
- <= 5.0.1
- Fixed in
- 5.1.0
- Check
npm ls @node-saml/node-saml
passport-saml
- Ecosystem
- npm
- Affected
- <= 3.2.4
- Fixed in
- No patched version yet
- Check
npm ls passport-saml
@node-saml/passport-saml
- Ecosystem
- npm
- Affected
- <= 5.0.1
- Fixed in
- 5.1.0
- Check
npm ls @node-saml/passport-saml
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Node-SAML loads the assertion from the (unsigned) original response document. This is different than the parts that are verified when checking signature.
This allows an attacker to modify authentication details within a valid SAML assertion. For example, in one attack it is possible to remove any character from the SAML assertion username.
To conduct the attack an attacker would need a validly signed document from the identity provider (IdP).
In fixing this we made sure to process the SAML assertions from only verified/authenticated contents. This will prevent future variants from coming up.
Note: this is distinct from the previous xml-crypto CVEs.
Credited to ahacker1-securesaml, cjbarth.
References
- https://github.com/node-saml/node-saml/security/advisories/GHSA-4mxg-3p6v-xgq3
- https://github.com/node-saml/node-saml/commit/31ead9411ebc3e2385086fa9149b6c17732bca10
- https://github.com/node-saml/node-saml/releases/tag/v5.1.0
- https://nvd.nist.gov/vuln/detail/CVE-2025-54419
- https://github.com/advisories/GHSA-4mxg-3p6v-xgq3
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
