CVE-2017-16897: Passport wsfed saml2 Passport-wsfed-saml2 Vulnerable To Signature Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-77fw-rf4v-vfp9
CVSS 8.1
CWE-290
Published
Advisory Summary

CVE-2017-16897 is a HIGH (CVSS 8.1) passport-wsfed-saml2 vulnerable to signature bypass vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Passport wsfed saml2 libraries in the npm ecosystem. The issue involves passport-wsfed-saml2 vulnerable to signature bypass in saml2 token. Remediation is available by upgrading affected packages to version 3.0.5.

CVE-2017-16897 at a Glance

CVE Identifier CVE-2017-16897
GHSA Identifier GHSA-77fw-rf4v-vfp9
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-290: Authentication Bypass by Spoofing
Affected Product Passport wsfed saml2
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

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

How to Fix CVE-2017-16897

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: 3.0.5
npm install passport-wsfed-saml2@3.0.5
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-2017-16897, 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 3.0.5), 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-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. 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

## Information Please note that this is not a new disclosure, and is previously reported in our [SECURITY-NOTICE.md](https://github.com/auth0/passport-wsfed-saml2/commit/520b9fc0bb4249ce83bec47e30153419f086ab70 ) which we removed in favor of github advisory. # Overview This vulnerability allows an attacker to impersonate another user and potentially elevate their privileges if the SAML identity provider: - signs SAML response and signs assertion - does not sign SAML response and signs assertion # Am I affected? You may be affected if you use SAML2 protocol with passport-wsfed-saml2 versions below 3.0.5 and your SAML identity Provider: 1. signs SAML response and signs assertion; or 2. does not sign SAML response and signs assertion # How do I fix it? You may fix this vulnerability by upgrading your library to version 3.0.5 or above. # Will the fix impact my users? This fix patches the library that your application runs, but will not impact your users, their current state, or any existing sessions.

CVE-2017-16897 Affected Passport wsfed saml2 Versions

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

References

Frequently Asked Questions

What is CVE-2017-16897?
CVE-2017-16897 is a security vulnerability in Passport wsfed saml2 involving passport-wsfed-saml2 vulnerable to Signature Bypass in SAML2 token under CWE-290: Authentication Bypass by Spoofing.
Which Passport wsfed saml2 versions are affected?
Affected versions include releases prior to 3.0.5 across affected packages: passport-wsfed-saml2.
What version fixes CVE-2017-16897?
Upgrading to 3.0.5 (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 3.0.5. Upgrade your dependency to 3.0.5 or later.
What is the CVSS score of CVE-2017-16897?
CVE-2017-16897 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2017-16897?
CVE-2017-16897 is classified under CWE-290: Authentication Bypass by Spoofing (This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.).
How can I check npm dependencies for CVE-2017-16897?
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-77fw-rf4v-vfp9",
  "modified" : "2023-06-21T22:00:18Z",
  "published" : "2023-06-21T22:00:18Z",
  "aliases" : [ "CVE-2017-16897" ],
  "summary" : "passport-wsfed-saml2 vulnerable to Signature Bypass in SAML2 token",
  "details" : "## Information\nPlease note that this is not a new disclosure, and is previously reported in our [SECURITY-NOTICE.md](https://github.com/auth0/passport-wsfed-saml2/commit/520b9fc0bb4249ce83bec47e30153419f086ab70\n) which we removed in favor of github advisory. \n\n# Overview \n This vulnerability allows an attacker to impersonate another user and potentially elevate their privileges if the SAML identity provider:\n\n- signs SAML response and signs assertion\n\n- does not sign SAML response and signs assertion\n\n# Am I affected?\n\nYou may be affected if you use SAML2 protocol with passport-wsfed-saml2 versions below 3.0.5 and your SAML identity Provider: \n1. signs SAML response and signs assertion; or \n2. does not sign SAML response and signs assertion\n\n# How do I fix it?\n\nYou may fix this vulnerability by upgrading your library to version 3.0.5 or above. \n\n# Will the fix impact my users?\nThis fix patches the library that your application runs, but will not impact your users, their current state, or any existing sessions.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "passport-wsfed-saml2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/auth0/passport-wsfed-saml2/security/advisories/GHSA-77fw-rf4v-vfp9"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-16897"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/passport-wsfed-saml2/commit/520b9fc0bb4249ce83bec47e30153419f086ab70"
  }, {
    "type" : "WEB",
    "url" : "https://auth0.com/docs/security/bulletins/cve-2017-16897"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/auth0/passport-wsfed-saml2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-21T22:00:18Z",
    "nvd_published_at" : null
  }
}