Vulnerabilities in pkg:npm/auth0

PACKAGE
Advisory Identifier: GHSA-5jpf-pj32-xx53
Advisory Summary

CVE-2020-15125 is a HIGH (CVSS 7.7) authorization header is not sanitized vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting Auth0 libraries in the npm ecosystem. The issue involves authorization header is not sanitized in an error object in auth0. Remediation is available by upgrading affected packages to version 2.27.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/auth0

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-5jpf-pj32-xx53 CVE-2020-15125 HIGH Authorization header is not sanitized in an error object in auth0

CVE-2020-15125 at a Glance

CVE Identifier CVE-2020-15125
GHSA Identifier GHSA-5jpf-pj32-xx53
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-209: Generation of Error Message Containing Sensitive Information
Affected Product Auth0
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.7

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

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

How to Fix CVE-2020-15125

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

auth0 fixed: 2.27.1
npm install auth0@2.27.1
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 auth0

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2020-15125, inspect your project dependencies using npm:

npm ls auth0

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

Note: The npm ls auth0 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-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In Auth0, 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 Versions before and including `2.27.0` use a block list of specific keys that should be sanitized from the request object contained in the error object. When a request to Auth0 management API fails, the key for `Authorization` header is not sanitized and the `Authorization` header value can be logged exposing a bearer token. ### Am I affected? You are affected by this vulnerability if all of the following conditions apply: - You are using `auth0` npm package - You are using a Machine to Machine application authorized to use Auth0's management API https://auth0.com/docs/flows/concepts/client-credentials ### How to fix that? Upgrade to version `2.27.1` ### Will this update impact my users? The fix provided in patch will not affect your users. ### Credit http://github.com/osdiab

CVE-2020-15125 Affected Auth0 Versions

1 component(s)
Fixed Versions:
2.27.1
Product / Package Ecosystem Affected Versions Fixed Version
auth0
npm
< 2.27.1
2.27.1

References

Frequently Asked Questions

What is CVE-2020-15125?
CVE-2020-15125 is a security vulnerability in Auth0 involving Authorization header is not sanitized in an error object in auth0 under CWE-209: Generation of Error Message Containing Sensitive Information.
Which Auth0 versions are affected?
Affected versions include releases prior to 2.27.1 across affected packages: auth0.
What version fixes CVE-2020-15125?
Upgrading to 2.27.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is auth0 affected?
Yes, auth0 is affected in releases prior to 2.27.1. Upgrade your dependency to 2.27.1 or later.
What is the CVSS score of CVE-2020-15125?
CVE-2020-15125 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2020-15125?
CVE-2020-15125 is classified under CWE-209: Generation of Error Message Containing Sensitive Information (The product generates an error message that includes sensitive information about its environment, users, or associated data.).
How can I check npm dependencies for CVE-2020-15125?
Run the dependency tree command: 'npm ls auth0'. 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-5jpf-pj32-xx53",
  "modified" : "2021-01-07T23:44:25Z",
  "published" : "2020-07-29T16:26:22Z",
  "aliases" : [ "CVE-2020-15125" ],
  "summary" : "Authorization header is not sanitized in an error object in auth0",
  "details" : "### Overview\nVersions before and including `2.27.0` use a block list of specific keys that should be sanitized from the request object contained in the error object.  When a request to Auth0 management API fails, the key for `Authorization` header is not sanitized and the `Authorization` header value can be logged exposing a bearer token.\n\n### Am I affected?\nYou are affected by this vulnerability if all of the following conditions apply:\n\n- You are using `auth0` npm package\n- You are using a Machine to Machine application authorized to use Auth0's management API https://auth0.com/docs/flows/concepts/client-credentials\n\n### How to fix that?\nUpgrade to version `2.27.1`\n\n### Will this update impact my users?\nThe fix provided in patch will not affect your users.\n\n### Credit\nhttp://github.com/osdiab",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "auth0"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.27.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/auth0/node-auth0/security/advisories/GHSA-5jpf-pj32-xx53"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15125"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/node-auth0/pull/507"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/node-auth0/pull/507/commits/62ca61b3348ec8e74d7d00358661af1a8bc98a3c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/auth0/node-auth0/tree/v2.27.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-209" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-07-29T16:25:59Z",
    "nvd_published_at" : null
  }
}