Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | npm | 5.8.0+ds-2 | — |
| Debian 13 | npm | 5.8.0+ds-2 | — |
| Debian 12 | npm | 5.8.0+ds-2 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | npm | 3.5.2-0ubuntu4.1.18.04.1~esm1 | USN-4785-1 |
| Ubuntu Pro 16.04 LTS | npm | 3.5.2-0ubuntu4.1.16.04.1~esm1 | USN-4785-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | npm | < 2.15.1 | 2.15.1 | GHSA-m5h6-hr3q-22h5 |
| npm | npm | >= 3.0.0, < 3.8.3 | 3.8.3 | GHSA-m5h6-hr3q-22h5 |
Advisories 1
- USN-4785-1 npm vulnerability Ubuntu Security Notices (USN) · Jun 25, 2026
References
- https://github.com/npm/npm/issues/8380
- https://github.com/npm/npm/commit/f67ecad59e99a03e5aad8e93cd1a086ae087cb29
- http://www-01.ibm.com/support/docview.wss?uid=swg21980827
- https://github.com/npm/npm/commit/fea8cc92cee02c720b58f95f14d315507ccad401
- http://blog.npmjs.org/post/142036323955/fixing-a-bearer-token-vulnerability
- https://nodejs.org/en/blog/vulnerability/npm-tokens-leak-march-2016/