CVE-2020-15095: Npm Npm CLI Exposing Sensitive Information Vulnerability

MODERATE
Advisory Identifier: GHSA-93f3-23rq-pjfp
CVSS 4.4
CWE-532
Published
Advisory Summary

CVE-2020-15095 is a MODERATE (CVSS 4.4) npm cli exposing sensitive information vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting Npm libraries in the npm ecosystem. The issue involves npm cli exposing sensitive information through logs. Remediation is available by upgrading affected packages to version 6.14.6.

CVE-2020-15095 at a Glance

CVE Identifier CVE-2020-15095
GHSA Identifier GHSA-93f3-23rq-pjfp
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-532: Insertion of Sensitive Information into Log File
Affected Product Npm
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.4

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

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

How to Fix CVE-2020-15095

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

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

How to Check if You Are Affected

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

npm ls npm

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

Note: The npm ls npm 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-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In Npm, 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 the npm CLI prior to 6.14.6 are vulnerable to an information exposure vulnerability through log files. The CLI supports URLs like `<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>`. The password value is not redacted and is printed to stdout and also to any generated log files.

CVE-2020-15095 Affected Npm Versions

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

References

Frequently Asked Questions

What is CVE-2020-15095?
CVE-2020-15095 is a security vulnerability in Npm involving npm CLI exposing sensitive information through logs under CWE-532: Insertion of Sensitive Information into Log File.
Which Npm versions are affected?
Affected versions include releases prior to 6.14.6 across affected packages: npm.
What version fixes CVE-2020-15095?
Upgrading to 6.14.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is npm affected?
Yes, npm is affected in releases prior to 6.14.6. Upgrade your dependency to 6.14.6 or later.
What is the CVSS score of CVE-2020-15095?
CVE-2020-15095 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2020-15095?
CVE-2020-15095 is classified under CWE-532: Insertion of Sensitive Information into Log File (The product writes sensitive information to a log file.).
How can I check npm dependencies for CVE-2020-15095?
Run the dependency tree command: 'npm ls npm'. 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-93f3-23rq-pjfp",
  "modified" : "2022-08-10T23:59:40Z",
  "published" : "2020-07-07T18:56:16Z",
  "aliases" : [ "CVE-2020-15095" ],
  "summary" : "npm CLI exposing sensitive information through logs",
  "details" : "Versions of the npm CLI prior to 6.14.6 are vulnerable to an information exposure vulnerability through log files. The CLI supports URLs like `<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>`. The password value is not redacted and is printed to stdout and also to any generated log files.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "npm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.14.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/npm/cli/security/advisories/GHSA-93f3-23rq-pjfp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-15095"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/npm/cli/commit/a9857b8f6869451ff058789c4631fadfde5bbcbc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/npm/cli/blob/66aab417f836a901f8afb265251f761bb0422463/CHANGELOG.md#6146-2020-07-07"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4OOYAMJVLLCLXDTHW3V5UXNULZBBK4O6"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202101-07"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00011.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00015.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00023.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-532" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-07-07T18:30:59Z",
    "nvd_published_at" : "2020-07-07T19:15:00Z"
  }
}