Introduction
Attackers can tamper with SAML authentication details in Node.js applications that use Node-SAML, and may be able to grant themselves unauthorized access to any account. The flaw affects a foundational authentication mechanism for many enterprise and cloud applications, so security teams should treat it as a high priority.
Node-SAML is a widely used open-source library that implements SAML 2.0 authentication for Node.js applications. The Node-SAML organization maintains it, along with related projects such as passport-saml and xml-crypto. Many production environments rely on Node-SAML for SAML-based single sign-on, so its security directly affects the integrity of authentication across a broad range of applications.
Technical information
Node-SAML versions 5.0.1 and below contain a critical authentication bypass in the way the library processes SAML assertions. After Node-SAML verifies the digital signature on a SAML response, it loads the assertion data from the original, unsigned XML document instead of from the cryptographically validated content. Because of this architectural flaw, an attacker can change authentication attributes in the SAML assertion, such as the username, and the signature check still passes.
To exploit it, the attacker first needs a validly signed SAML response from the identity provider (IdP). They can get one by intercepting a legitimate authentication flow or by using their own valid credentials. They then modify the assertion in the unsigned portion of the response, for example by removing or changing characters in the username field, and submit the tampered response to the service provider. Because Node-SAML extracts assertion data from the untrusted XML, the service provider accepts the manipulated authentication details as valid. The result is a complete authentication bypass.
The root cause is the separation between signature verification and assertion parsing. Node-SAML's xml-crypto dependency, in versions prior to 6.1.2, contributed to the problem by not ensuring that only verified content was processed. Node-SAML version 5.1.0 fixes the vulnerability by updating xml-crypto and parsing assertions only from verified content.
Affected systems and versions
- Node-SAML versions 5.0.1 and below are affected.
- Any Node.js application that uses Node-SAML directly or as a dependency (for example, via passport-saml) is vulnerable.
- SAML configuration makes no difference, because the flaw lies in how assertion data is loaded after signature verification.
Vendor security history
Node-SAML and its dependencies have had several critical vulnerabilities in 2025, including:
- CVE-2025-54369: Similar authentication bypass in Node-SAML
- CVE-2025-29774 and CVE-2025-29775: XML signature handling flaws in xml-crypto
The Node-SAML maintainers have responded quickly to these issues with patches and advisories. Still, how often these flaws appear points to persistent security problems in SAML implementations for Node.js.



