Automated Threat Modeling

Node-SAML CVE-2025-54419: Brief Summary of Critical SAML Assertion Authentication Bypass

A brief summary of CVE-2025-54419, a critical authentication bypass in Node-SAML versions 5.0.1 and below. Attackers can modify SAML assertions after signature verification, which affects any Node.js application that relies on the library for SAML authentication. The post covers technical details, affected versions, and references.

CVE Analysis

8 min read

ZeroPath CVE Analysis
ZeroPath CVE Analysis

2025-07-28

Node-SAML CVE-2025-54419: Brief Summary of Critical SAML Assertion Authentication Bypass
Experimental AI-Generated Content

This CVE analysis is an experimental publication that is completely AI-generated. The content may contain errors or inaccuracies and is subject to change as more information becomes available. We are continuously refining our process.

If you have feedback, questions, or notice any errors, please reach out to us.

[email protected]

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.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization