CVE-2016-3956
npm Token Leak in npm
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
- Update npm with
npm install npm@latest -g - Revoke your Tokens
- Enable Two-Factor Authentication
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.webjars » npmvia npm npm | < 2.15.1>= 3.0.0, < 3.8.3 | 2.15.1, 3.8.3 |
| org.webjars.npm » npmvia npm npm | < 2.15.1>= 3.0.0, < 3.8.3 | 2.15.1, 3.8.3 |
Blast radius
0% of the dependent artifacts (0) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 11 |
| 2 hops | 2 |
Most used dependents
- org.webjars.npm » ember-cli1 usages
- com.typesafe » npm0 usages
- org.webjars.npm » angular-cli0 usages
- org.webjars.npm » ionic0 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2016-3956 | nvd.nist.gov |
| Advisory | GitHub advisory GHSA-m5h6-hr3q-22h5 | github.com |
| Web | npm/npm issue #8380 | github.com |
| Web | npm/npm commit f67ecad | github.com |
| Web | npm/npm commit fea8cc9 | github.com |
| Web | en/blog/vulnerability/npm-tokens-leak-march-2016 | nodejs.org |
| Web | advisories/98 | npmjs.com |
| Web | post/142036323955/fixing-a-bearer-token-vulnerability | blog.npmjs.org |
| Web | support/docview.wss | www-01.ibm.com |
