CVE-2016-3956 is a high-severity (CVSS 7.5) Information Exposure vulnerability in npm. A fix is available for npm — see the affected versions and patch details below.
npm Token Leak in npm
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
npmnpmDescription
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | npm | all versions | 2.15.1npm install npm@2.15.1 |
| 📦npm | npm | ≥ 3.0.0&&< 3.8.3 | 3.8.3npm install npm@3.8.3 |
Affected Products
sdkibmnode.jsnodejsnpmnpmjsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for npm, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update npm to 2.15.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2016-3956 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Frequently Asked Questions
Is CVE-2016-3956 in your dependencies?
Find it across npm, including transitive dependencies.