Sensitive Information Exposure in npm CLI - CVE-2016-3956

npm Updated 02 Oct 2025

Summary

02/07/2016
N/A
Yes i
High
7.5

CVE-2016-3956: 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 HTT... Affects npm across 4 version ranges.

< 5.8.0+ds-2 < e93d20877150a78c5147031866a550d256f46529 < f67ecad59e99a03e5aad8e93cd1a086ae087cb29 < fea8cc92cee02c720b58f95f14d315507ccad401

Fixed in 5.8.0+ds-2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

npm (Node Package Manager) is a widely used package manager for JavaScript, primarily for Node.js applications. It allows developers to install, share, and manage dependencies in their projects. The npm CLI is the command-line interface that facilitates these operations. This vulnerability affects multiple versions of npm, specifically versions prior to 2.15.1 and 3.x before 3.8.3, exposing sensitive information through Authorization headers in HTTP requests.

Vulnerability Detail

CVE-2016-3956 is a vulnerability in the npm CLI that allows remote HTTP servers to access sensitive information by reading Authorization headers. This occurs when bearer tokens are included in arbitrary requests made by the npm CLI. The vulnerability can lead to unauthorized access to sensitive data, potentially compromising user credentials and other confidential information. The issue arises from improper handling of bearer tokens in HTTP requests, making it critical for users to update their npm installations to mitigate the risk.

How To Fix

Minimum fixed version

5.8.0+ds-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade npm

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid including sensitive bearer tokens in requests made by the npm CLI until they can update to a secure version. This can be done by ensuring that any scripts or commands do not pass Authorization headers or tokens.

Conclusion

CVE-2016-3956 is a significant vulnerability in the npm CLI that can expose sensitive information through improper handling of Authorization headers. It is crucial for users to update their npm installations to mitigate this risk and protect their applications from unauthorized access.

See every vulnerability recorded for npm →

Share this vulnerability

FAQ

CVE-2016-3956 is a vulnerability in the npm CLI that allows unauthorized access to sensitive information through exposed Authorization headers.

npm versions before 2.15.1 and 3.x before 3.8.3 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

As a temporary measure, avoid including sensitive bearer tokens in requests made by the npm CLI until you can update to a secure version.

The CVSS score for CVE-2016-3956 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for npm.

How To Fix

Minimum fixed version

5.8.0+ds-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade npm

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback