GHSA-jmqm-f2gx-4fjv: Npm registry fetch Sensitive Information Exposure Through Logs Vulnerability

MODERATE
CVSS 5.3
CWE-352
Published
Advisory Summary

GHSA-jmqm-f2gx-4fjv is a MODERATE (CVSS 5.3) sensitive information exposure through logs vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Npm registry fetch libraries in the npm ecosystem. The issue involves sensitive information exposure through logs in npm-registry-fetch. Remediation is available by upgrading affected packages to version 4.0.5, 8.1.1.

GHSA-jmqm-f2gx-4fjv at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jmqm-f2gx-4fjv
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Npm registry fetch
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

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

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

How to Fix GHSA-jmqm-f2gx-4fjv

To remediate this vulnerability, upgrade all affected Npm registry fetch 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-registry-fetch fixed: 4.0.5
npm install npm-registry-fetch@4.0.5
npm-registry-fetch fixed: 8.1.1
npm install npm-registry-fetch@8.1.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 npm-registry-fetch

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-jmqm-f2gx-4fjv, inspect your project dependencies using npm:

npm ls npm-registry-fetch

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

Note: The npm ls npm-registry-fetch 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Npm registry fetch, 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

Affected versions of `npm-registry-fetch` 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.

GHSA-jmqm-f2gx-4fjv Affected Npm registry fetch Versions

2 component(s)
Fixed Versions:
4.0.58.1.1
Product / Package Ecosystem Affected Versions Fixed Version
npm-registry-fetch
npm
< 4.0.5
4.0.5
npm-registry-fetch
npm
≥ 5.0.0
< 8.1.1
8.1.1

References

Frequently Asked Questions

What is GHSA-jmqm-f2gx-4fjv?
GHSA-jmqm-f2gx-4fjv is a security vulnerability in Npm registry fetch involving Sensitive information exposure through logs in npm-registry-fetch under CWE-352: Cross-Site Request Forgery (CSRF).
Which Npm registry fetch versions are affected?
Affected versions include releases prior to 4.0.5, 8.1.1 across affected packages: npm-registry-fetch.
What version fixes GHSA-jmqm-f2gx-4fjv?
Upgrading to 4.0.5, 8.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is npm-registry-fetch affected?
Yes, npm-registry-fetch is affected in releases prior to 4.0.5, 8.1.1. Upgrade your dependency to 4.0.5, 8.1.1 or later.
What is the CVSS score of GHSA-jmqm-f2gx-4fjv?
GHSA-jmqm-f2gx-4fjv has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with GHSA-jmqm-f2gx-4fjv?
GHSA-jmqm-f2gx-4fjv is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check npm dependencies for GHSA-jmqm-f2gx-4fjv?
Run the dependency tree command: 'npm ls npm-registry-fetch'. 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-jmqm-f2gx-4fjv",
  "modified" : "2021-09-22T19:00:07Z",
  "published" : "2020-07-07T18:59:10Z",
  "aliases" : [ ],
  "summary" : "Sensitive information exposure through logs in npm-registry-fetch",
  "details" : "Affected versions of `npm-registry-fetch` 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:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "npm-registry-fetch"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.0.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "npm-registry-fetch"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "8.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/npm/npm-registry-fetch/security/advisories/GHSA-jmqm-f2gx-4fjv"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/npm/npm-registry-fetch/pull/29"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/npm/npm-registry-fetch/commit/18bf9b97fb1deecdba01ffb05580370846255c88"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/npm/npm-registry-fetch"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-NPMREGISTRYFETCH-575432"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-07-07T18:26:15Z",
    "nvd_published_at" : null
  }
}