Vulnerabilities in pkg:npm/saml2-js

PACKAGE
Advisory Summary

GHSA-mfcp-34xw-p57x is a MODERATE (CVSS 6.8) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Saml2 js libraries in the npm ecosystem. The issue involves authentication bypass in saml2-js. Remediation is available by upgrading affected packages to version 2.0.5.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/saml2-js

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/saml2-js. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mfcp-34xw-p57x - MODERATE Authentication Bypass in saml2-js
GHSA-5p5w-j3g7-w4wv CVE-2017-11429 MODERATE Authentication bypass via incorrect XML canonicalization and DOM traversal in saml2-js

GHSA-mfcp-34xw-p57x at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mfcp-34xw-p57x
Severity MODERATE
CVSS v3.1 Base Score 6.8
CWE Classification CWE-287: Improper Authentication
Affected Product Saml2 js
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.8

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

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

How to Fix GHSA-mfcp-34xw-p57x

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

saml2-js fixed: 2.0.5
npm install saml2-js@2.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 saml2-js

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-mfcp-34xw-p57x, inspect your project dependencies using npm:

npm ls saml2-js

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

Note: The npm ls saml2-js 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 Saml2 js, 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

Versions of `saml2-js` prior to 2.0.5 are vulnerable to an Authentication Bypass. The package fails to enforce the assertion conditions for encrypted assertions, which may allow an attacker to reuse encrypted assertion tokens indefinitely. ## Recommendation Upgrade to version 2.0.5 or later.

GHSA-mfcp-34xw-p57x Affected Saml2 js Versions

1 component(s)
Fixed Versions:
2.0.5
Product / Package Ecosystem Affected Versions Fixed Version
saml2-js
npm
< 2.0.5
2.0.5

References

Frequently Asked Questions

What is GHSA-mfcp-34xw-p57x?
GHSA-mfcp-34xw-p57x is a security vulnerability in Saml2 js involving Authentication Bypass in saml2-js under CWE-287: Improper Authentication.
Which Saml2 js versions are affected?
Affected versions include releases prior to 2.0.5 across affected packages: saml2-js.
What version fixes GHSA-mfcp-34xw-p57x?
Upgrading to 2.0.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is saml2-js affected?
Yes, saml2-js is affected in releases prior to 2.0.5. Upgrade your dependency to 2.0.5 or later.
What is the CVSS score of GHSA-mfcp-34xw-p57x?
GHSA-mfcp-34xw-p57x has a CVSS v3.1 base score of 6.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with GHSA-mfcp-34xw-p57x?
GHSA-mfcp-34xw-p57x 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 GHSA-mfcp-34xw-p57x?
Run the dependency tree command: 'npm ls saml2-js'. 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-mfcp-34xw-p57x",
  "modified" : "2021-09-29T20:12:42Z",
  "published" : "2020-09-03T21:20:52Z",
  "aliases" : [ ],
  "summary" : "Authentication Bypass in saml2-js",
  "details" : "Versions of `saml2-js` prior to 2.0.5 are vulnerable to an Authentication Bypass. The package fails to enforce the assertion conditions for encrypted assertions, which may allow an attacker to reuse encrypted assertion tokens indefinitely.\n\n\n## Recommendation\n\nUpgrade to version 2.0.5 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "saml2-js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Clever/saml2/pull/190"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Clever/saml2/commit/ae0da4d0a0ea682a737be481e3bd78798be405c0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Clever/saml2"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-SAML2JS-474637"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1222"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:51:27Z",
    "nvd_published_at" : null
  }
}