Vulnerabilities in pkg:npm/passport-saml

PACKAGE
Advisory Identifier: GHSA-4mxg-3p6v-xgq3
Advisory Summary

CVE-2025-54419 is a CRITICAL (CVSS 10.0) node-saml saml signature verification vulnerability vulnerability (CWE-287: Improper Authentication) affecting @node saml/node saml libraries in the npm ecosystem. The issue involves node-saml saml signature verification vulnerability. Remediation is available by upgrading affected packages to version 5.1.0.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/passport-saml

3 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-4mxg-3p6v-xgq3 CVE-2025-54419 CRITICAL Node-SAML SAML Signature Verification Vulnerability
GHSA-5379-r78w-42h2 CVE-2021-39171 MODERATE Unlimited transforms allowed for signed nodes
GHSA-m974-647v-whv7 CVE-2022-39299 HIGH Signature bypass via multiple root elements

CVE-2025-54419 at a Glance

CVE Identifier CVE-2025-54419
GHSA Identifier GHSA-4mxg-3p6v-xgq3
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-287: Improper Authentication
Affected Product @node saml/node saml
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 10.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2025-54419

To remediate this vulnerability, upgrade all affected @node saml/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/node-saml fixed: 5.1.0
npm install @node-saml/node-saml@5.1.0
passport-saml fixed: Latest secure release
npm install passport-saml@Latest secure release
@node-saml/passport-saml fixed: 5.1.0
npm install @node-saml/passport-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/node-saml

How to Check if You Are Affected

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

npm ls @node-saml/node-saml

Analyze the terminal output to locate any version of @node saml/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/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/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 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.

CVE-2025-54419 Affected @node saml/node saml Versions

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

References

Frequently Asked Questions

What is CVE-2025-54419?
CVE-2025-54419 is a security vulnerability in @node saml/node saml involving Node-SAML SAML Signature Verification Vulnerability under CWE-287: Improper Authentication.
Which @node saml/node saml versions are affected?
Affected versions include releases prior to 5.1.0 across affected packages: @node-saml/node-saml, passport-saml, @node-saml/passport-saml.
What version fixes CVE-2025-54419?
Upgrading to 5.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
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.
Is passport-saml affected?
Yes, passport-saml is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-54419?
CVE-2025-54419 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N.
What CWE is associated with CVE-2025-54419?
CVE-2025-54419 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-54419?
Run the dependency tree command: 'npm ls @node-saml/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-4mxg-3p6v-xgq3",
  "modified" : "2025-08-08T14:53:55Z",
  "published" : "2025-07-28T20:38:44Z",
  "aliases" : [ "CVE-2025-54419" ],
  "summary" : "Node-SAML SAML Signature Verification Vulnerability",
  "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 made sure to process the SAML assertions from only verified/authenticated contents. This will prevent future variants from coming up. \n\nNote: this is distinct from the previous xml-crypto CVEs.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "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"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "passport-saml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@node-saml/passport-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-4mxg-3p6v-xgq3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54419"
  }, {
    "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" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-28T20:38:44Z",
    "nvd_published_at" : "2025-07-28T20:17:48Z"
  }
}