CVE-2016-3956
npm Token Leak in npm
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 before 5.10.0, includes bearer tokens with arbitrary requests, which allows remote HTTP servers to obtain sensitive information by reading Authorization headers.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
7.5
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 before 5.10.0, includes bearer tokens with arbitrary requests, which allows remote HTTP servers to obtain sensitive information by reading Authorization headers.
- Record
CVE-2016-3956- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-200
- Updated
- 2026-11-02
CVE List No score
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 before 5.10.0, includes bearer tokens with arbitrary requests, which allows remote HTTP servers to obtain sensitive information by reading Authorization headers.
- Record
CVE-2016-3956- Updated
- 2026-11-02
EUVDEUVD-2018-0293 No score
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 before 5.10.0, includes bearer tokens with arbitrary requests, which allows remote HTTP servers to obtain sensitive information by reading Authorization headers.
- Record
EUVD-2018-0293- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-m5h6-hr3q-22h5 No score
npm Token Leak in npm
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
- Update npm with
npm install npm@latest -g - Revoke your Tokens
- Enable Two-Factor Authentication
- Record
GHSA-m5h6-hr3q-22h5- Weakness
- CWE-200
- Updated
- 2026-11-02
OSV
7.5
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 before 5.10.0, includes bearer tokens with arbitrary requests, which allows remote HTTP servers to obtain sensitive information by reading Authorization headers.
- Record
CVE-2016-3956- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2016-3956
7.5
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 before 5.10.0, includes bearer tokens with arbitrary requests, which allows remote HTTP servers to obtain sensitive information by reading Authorization headers.
- Record
DEBIAN-CVE-2016-3956- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-3956
7.5
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 before 5.10.0, includes bearer tokens with arbitrary requests, which allows remote HTTP servers to obtain sensitive information by reading Authorization headers.
- Record
UBUNTU-CVE-2016-3956- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 3.0
- 7.5 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVGHSA-m5h6-hr3q-22h5 No score
npm Token Leak in npm
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
- Update npm with
npm install npm@latest -g - Revoke your Tokens
- Enable Two-Factor Authentication
- Record
GHSA-m5h6-hr3q-22h5- Weakness
- CWE-200
- Updated
- 2026-11-02
OSVUSN-4785-1 No score
npm vulnerability
It was discovered that the npm command-line interface mishandled certain sensitive information. An attacker could use this vulnerability to collect authentication information that could be used to impersonate other users.
- Record
USN-4785-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
npmnpm |
through 2.15.0 | 2.15.1 |
npmnpm |
3.0.0 to 3.8.2 | 3.8.3 |
npmDebian:12 |
before 5.8.0+ds-2 | 5.8.0+ds-2 |
npmDebian:13 |
before 5.8.0+ds-2 | 5.8.0+ds-2 |
npmDebian:14 |
before 5.8.0+ds-2 | 5.8.0+ds-2 |
npmnpm |
before 2.15.1 | 2.15.1 |
npmnpm |
3.0.0 up to 3.8.3 | 3.8.3 |
npmUbuntu:Pro:16.04:LTS |
before 3.5.2-0ubuntu4.1.16.04.1~esm1, plus listed versions 1.4.21+ds-23.5.2-0ubuntu4 |
3.5.2-0ubuntu4.1.16.04.1~esm1 |
npmUbuntu:Pro:18.04:LTS |
before 3.5.2-0ubuntu4.1.18.04.1~esm1, plus listed versions 3.5.2-0ubuntu4 |
3.5.2-0ubuntu4.1.18.04.1~esm1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-3956 is a high vulnerability (CVSS 7.5) in Nodejs Node.js, published July 2, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 5.46%, the 92nd percentile. Fixed in npm 2.15.1.
References
github.com/npm/npm/issues/8380
github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29
www-01.ibm.com/support/docview.wss?uid=swg21980827
github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401
blog.npmjs.org/post/142036323955/fixing-a-bearer-token-vulnerability
nodejs.org/en/blog/vulnerability/npm-tokens-leak-march-2016