# CVE-2017-16897: passport-wsfed-saml2 signature bypass in SAML2 token validation

Source: https://junglewise.ai/threats/cve-2017-16897-passport-wsfed-saml2-signature-bypass-in-saml2-token-validation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2023-06-21. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2017-16897 · Severity: low · CVSS 3 · Published 2023-06-21

passport-wsfed-saml2 is a Node.js library that handles SAML2-based authentication for web applications. A signature verification flaw allows attackers to forge or tamper with SAML authentication tokens, bypassing identity verification and potentially impersonating other users or escalating privileges. This affects applications relying on this library for single sign-on authentication.

Technologies: [passport-wsfed-saml2 (npm)](https://junglewise.ai/threats/technologies/passport-wsfed-saml2). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2017-16897 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2017-16897 being exploited in the wild.

**How severe is CVE-2017-16897?** Low severity, with a CVSS score of 3, published 21 June 2023.

**Which products and versions are affected?** passport-wsfed-saml2 (npm) SEMVER:introduced=0,fixed=3.0.5.

**Is there a fix for CVE-2017-16897?** Yes. passport-wsfed-saml2 (npm): upgrade to 3.0.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2017-16897 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2017-16897?** Check whether you run passport-wsfed-saml2 (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- passport-wsfed-saml2 (npm): upgrade to 3.0.5 or later

  ```sh
  npm install passport-wsfed-saml2@3.0.5
  ```


## Technical details

The vulnerability is a signature bypass in SAML2 token validation (CWE-290), where the library fails to properly validate SAML response signatures under certain conditions, specifically when the identity provider signs the SAML assertion but either signs or does not sign the SAML response envelope. An unauthenticated attacker with network access can craft malicious SAML tokens to impersonate legitimate users. The vulnerability affects all versions prior to 3.0.5; the fix is available by upgrading to version 3.0.5 or later.

## Affected products

- Auth0 passport-wsfed-saml2 < 3.0.5

## Identifiers

- CVE-2017-16897
- GHSA-77fw-rf4v-vfp9

## Timeline

- 2023-06-21: disclosed
- 2023-06-21: patched: Version 3.0.5 released

## References

- [https://github.com/auth0/passport-wsfed-saml2/security/advisories/GHSA-77fw-rf4v-vfp9](https://github.com/auth0/passport-wsfed-saml2/security/advisories/GHSA-77fw-rf4v-vfp9)

## Related threats

- [Auth0 passport-wsfed-saml2 authentication bypass via SAML attribute smuggling](https://junglewise.ai/threats/cve-2025-46573-auth0-passport-wsfed-saml2-authentication-bypass-via-saml)
- [Passport-wsfed-saml2 SAML authentication bypass via signature wrapping](https://junglewise.ai/threats/cve-2025-46572-passport-wsfed-saml2-saml-authentication-bypass-via-signature)
- [Auth0 passport-wsfed-saml2 SAML signature relocation bypass](https://junglewise.ai/threats/auth0-passport-wsfed-saml2-saml-signature-relocation-bypass-9de6c222)
- [passport-wsfed-saml2 signature bypass in WSFed authentication](https://junglewise.ai/threats/cve-2022-23505-passport-wsfed-saml2-signature-bypass-in-wsfed-authentication)
- [Auth0 passport-wsfed-saml2 authentication bypass](https://junglewise.ai/threats/auth0-passport-wsfed-saml2-authentication-bypass-3bf0a7d5)
