Vulnerabilities in pkg:npm/node-saml

PACKAGE
Advisory Identifier: GHSA-m837-g268-mmv7
Advisory Summary

CVE-2025-54369 is a CRITICAL authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Node saml libraries in the npm ecosystem. The issue involves node-saml saml authentication bypass. Remediation is available by upgrading affected packages to version 5.1.0.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/node-saml

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/node-saml. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m837-g268-mmv7 CVE-2025-54369 CRITICAL Node-SAML SAML Authentication Bypass
GHSA-m974-647v-whv7 CVE-2022-39299 HIGH Signature bypass via multiple root elements
GHSA-5p8w-2mvw-38pv CVE-2022-39300 HIGH Signature bypass via multiple root elements

CVE-2025-54369 at a Glance

CVE Identifier CVE-2025-54369
GHSA Identifier GHSA-m837-g268-mmv7
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product Node saml
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-54369

To remediate this vulnerability, upgrade all affected Node saml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

node-saml fixed: Latest secure release
npm install node-saml@Latest secure release
@node-saml/node-saml fixed: 5.1.0
npm install @node-saml/node-saml@5.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls node-saml

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-54369, inspect your project dependencies using npm:

npm ls node-saml

Analyze the terminal output to locate any version of Node saml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.1.0), your application is affected.

Note: The npm ls node-saml command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Node saml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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 upgraded xml-crypto to v6.1.2 and made sure to process the SAML assertions from only verified/authenticated contents. This will prevent future variants from coming up.

CVE-2025-54369 Affected Node saml Versions

2 component(s)
Fixed Versions:
5.1.0
Product / Package Ecosystem Affected Versions Fixed Version
node-saml
npm
≤ 3.1.2
@node-saml/node-saml
npm
< 5.1.0
5.1.0

References

Frequently Asked Questions

What is CVE-2025-54369?
CVE-2025-54369 is a security vulnerability in Node saml involving Node-SAML SAML Authentication Bypass under CWE-287: Improper Authentication.
Which Node saml versions are affected?
Affected versions include releases prior to 5.1.0 across affected packages: node-saml, @node-saml/node-saml.
What version fixes CVE-2025-54369?
Upgrading to 5.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is node-saml affected?
Yes, node-saml is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is @node-saml/node-saml affected?
Yes, @node-saml/node-saml is affected in releases prior to 5.1.0. Upgrade your dependency to 5.1.0 or later.
What CWE is associated with CVE-2025-54369?
CVE-2025-54369 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2025-54369?
Run the dependency tree command: 'npm ls node-saml'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-m837-g268-mmv7",
  "modified" : "2025-07-25T14:08:50Z",
  "published" : "2025-07-25T14:08:50Z",
  "aliases" : [ "CVE-2025-54369" ],
  "summary" : "Node-SAML SAML Authentication Bypass",
  "details" : "Node-SAML loads the assertion from the (unsigned) original response document. This is different than the parts that are verified when checking signature. \n\nThis 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.\n\nTo conduct the attack an attacker would need a validly signed document from the identity provider (IdP).\n\nIn fixing this we upgraded xml-crypto to v6.1.2 and made sure to process the SAML assertions from only verified/authenticated contents. This will prevent future variants from coming up.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "node-saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@node-saml/node-saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.1.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 5.0.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/node-saml/node-saml/security/advisories/GHSA-m837-g268-mmv7"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54369"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/node-saml/node-saml/commit/31ead9411ebc3e2385086fa9149b6c17732bca10"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/node-saml/node-saml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/node-saml/node-saml/releases/tag/v5.1.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-347", "CWE-87" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-25T14:08:50Z",
    "nvd_published_at" : "2025-07-24T23:15:26Z"
  }
}