CVE-2025-46572: Passport wsfed saml2 Authentication Bypass Vulnerability
CRITICALCVE-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
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.
npm install passport-wsfed-saml2@4.6.4
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
CVE-2025-46572 Affected Passport wsfed saml2 Versions
1 component(s)| 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?
Which Passport wsfed saml2 versions are affected?
What version fixes CVE-2025-46572?
Is passport-wsfed-saml2 affected?
What CWE is associated with CVE-2025-46572?
How can I check npm dependencies for CVE-2025-46572?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}