GitHub Advisoryadvisory · npm

GHSA-m5h6-hr3q-22h5 npm Token Leak in npm

HIGH Published 2018-07-31 Modified 2020-08-31 Official page ↗
Aliases
CVE-2016-3956
Ecosystem
npm
Packages
npm
Severity
High
Weaknesses
CWE-200
Reviewed
2020-06-16

Affected packages

• npm npm: < 2.15.1 → fixed in 2.15.1 • npm npm: >= 3.0.0, < 3.8.3 → fixed in 3.8.3

Description

Affected versions of the `npm` package include the bearer token of the logged in user in every request made by the CLI, even if the request is not directed towards the user's active registry. An attacker could create an HTTP server to collect tokens, and by various means including but not limited to install scripts, cause the npm CLI to make a request to that server, which would compromise the user's token. This compromised token could be used to do anything that the user could do, including publishing new packages. Recommendation 1. Update npm with `npm install npm@latest -g` 2. Revoke your Tokens 3. Enable Two-Factor Authentication

Related

Alias · CVE (1)

  • CVE-2016-3956 The CLI in npm before 2.15.1 and 3.x before 3.8.3, as used in Node.js 0.10 before 0.10.44, 0.12 before 0.12.13, 4 before 4.4.2, and 5… vulnerability

Weakness · CWE (1)

  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor weakness

References