CVE-2025-46572: Passport wsfed saml2 Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-wjmp-wphq-jvqf
CWE-287 CWE-347
Published
Advisory Summary

CVE-2025-46572 is a CRITICAL authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Passport wsfed saml2 libraries in the npm ecosystem. The issue involves passport-wsfed-saml2 allows saml authentication bypass via signature wrapping. Remediation is available by upgrading affected packages to version 4.6.4.

CVE-2025-46572 at a Glance

CVE Identifier CVE-2025-46572
GHSA Identifier GHSA-wjmp-wphq-jvqf
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-287: Improper Authentication
Affected Product Passport wsfed saml2
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-46572

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

passport-wsfed-saml2 fixed: 4.6.4
npm install passport-wsfed-saml2@4.6.4
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 passport-wsfed-saml2

How to Check if You Are Affected

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

npm ls passport-wsfed-saml2

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

Note: The npm ls passport-wsfed-saml2 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 Passport wsfed saml2, 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

### Overview This vulnerability allows an attacker to impersonate any user during SAML authentication by crafting a SAMLResponse. This can be done by using a valid SAML object that was signed by the configured IdP. ### Am I Affected? You are affected by this SAML Signature Wrapping vulnerability if you are using `passport-wsfed-saml2` version 4.6.3 or below, specifically under the following conditions: 1. The service provider is using `passport-wsfed-saml2`, 2. A valid SAML document signed by the Identity Provider can be obtained. ### Fix Upgrade to v4.6.4 or greater.

CVE-2025-46572 Affected Passport wsfed saml2 Versions

1 component(s)
Fixed Versions:
4.6.4
Product / Package Ecosystem Affected Versions Fixed Version
passport-wsfed-saml2
npm
≥ 3.0.5
< 4.6.4
4.6.4

References

Frequently Asked Questions

What is CVE-2025-46572?
CVE-2025-46572 is a security vulnerability in Passport wsfed saml2 involving Passport-wsfed-saml2 allows SAML Authentication Bypass via Signature Wrapping under CWE-287: Improper Authentication.
Which Passport wsfed saml2 versions are affected?
Affected versions include releases prior to 4.6.4 across affected packages: passport-wsfed-saml2.
What version fixes CVE-2025-46572?
Upgrading to 4.6.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is passport-wsfed-saml2 affected?
Yes, passport-wsfed-saml2 is affected in releases prior to 4.6.4. Upgrade your dependency to 4.6.4 or later.
What CWE is associated with CVE-2025-46572?
CVE-2025-46572 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-46572?
Run the dependency tree command: 'npm ls passport-wsfed-saml2'. 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-wjmp-wphq-jvqf",
  "modified" : "2025-05-06T21:43:47Z",
  "published" : "2025-05-06T21:18:43Z",
  "aliases" : [ "CVE-2025-46572" ],
  "summary" : "Passport-wsfed-saml2 allows SAML Authentication Bypass via Signature Wrapping",
  "details" : "### Overview\nThis vulnerability allows an attacker to impersonate any user during SAML authentication by crafting a SAMLResponse. This can be done by using a valid SAML object that was signed by the configured IdP.\n\n### Am I Affected?\nYou are affected by this SAML Signature Wrapping vulnerability if you are using `passport-wsfed-saml2` version 4.6.3 or below, specifically under the following conditions:\n1. The service provider is using `passport-wsfed-saml2`,\n2. A valid SAML document signed by the Identity Provider can be obtained.\n\n### Fix\nUpgrade to v4.6.4 or greater.",
  "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" : "passport-wsfed-saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.5"
      }, {
        "fixed" : "4.6.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.6.3"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/auth0/passport-wsfed-saml2/security/advisories/GHSA-wjmp-wphq-jvqf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-46572"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/passport-wsfed-saml2/commit/e5cf3cc2a53748207f7a81bfba9195c8efa94181"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/auth0/passport-wsfed-saml2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287", "CWE-347" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-06T21:18:43Z",
    "nvd_published_at" : "2025-05-06T21:16:20Z"
  }
}