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

HIGH
Advisory Identifier: GHSA-8gqj-226h-gm8r
CWE-287 CWE-290
Published
Advisory Summary

CVE-2025-46573 is a HIGH 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 attribute smuggling. Remediation is available by upgrading affected packages to version 4.6.4.

CVE-2025-46573 at a Glance

CVE Identifier CVE-2025-46573
GHSA Identifier GHSA-8gqj-226h-gm8r
Severity HIGH
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-46573

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-46573, 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 tampering with a valid SAML response. This can be done by adding attributes to the response. ### Am I Affected? You are affected by this SAML Attribute Smuggling 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 Response signed by the Identity Provider can be obtained ### Fix Upgrade to v4.6.4 or greater.

CVE-2025-46573 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-46573?
CVE-2025-46573 is a security vulnerability in Passport wsfed saml2 involving Passport-wsfed-saml2 allows SAML Authentication Bypass via Attribute Smuggling 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-46573?
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-46573?
CVE-2025-46573 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-46573?
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-8gqj-226h-gm8r",
  "modified" : "2025-05-07T15:34:30Z",
  "published" : "2025-05-06T21:18:49Z",
  "aliases" : [ "CVE-2025-46573" ],
  "summary" : "Passport-wsfed-saml2 allows SAML Authentication Bypass via Attribute Smuggling",
  "details" : "### Overview\nThis vulnerability allows an attacker to impersonate any user during SAML authentication by tampering with a valid SAML response. This can be done by adding attributes to the response.\n\n### Am I Affected?\nYou are affected by this SAML Attribute Smuggling 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 Response 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:L/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-8gqj-226h-gm8r"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-46573"
  }, {
    "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-290" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-06T21:18:49Z",
    "nvd_published_at" : "2025-05-06T21:16:20Z"
  }
}