HIGH

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

  1. Update npm with npm install npm@latest -g
  2. Revoke your Tokens
  3. Enable Two-Factor Authentication

Affected Maven artifacts (2)

ArtifactAffected versionsFixed 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

2affected artifacts
8affected versions
4dependent artifacts (est.)
13dependent versions

0% of the dependent artifacts (0) still pull an affected version in their latest release.

DepthDependent versions
Direct
11
2 hops
2

Most used dependents

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