CVE-2020-15095 is a medium-severity (CVSS 4.4) CWE-532 vulnerability in npm. A fix is available for npm — see the affected versions and patch details below.
npm CLI exposing sensitive information through logs
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
Versions of the npm CLI prior to 6.14.6 are vulnerable to an information exposure vulnerability through log files. The CLI supports URLs like "<protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>". The password value is not redacted and is printed to stdout and also to any generated log files.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | npm | all versions | 6.14.6npm install npm@6.14.6 |
Affected Products
fedorafedoraprojectnpmnpmjsleapopensuseDetection & 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 6.14.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-15095 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.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Do not provide a password to npm via the cli to avoid it from being entered into the logs and stdout, or use ssh instead.Source: Red Hat security advisory for CVE-2020-15095 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | nodejs:12-8020020201007080935.4cda2c84 | RHSA-2020:4272 |
| Red Hat Enterprise Linux 8 | nodejs:10-8030020210118191659.229f0a1c | RHSA-2021:0548 |
| Red Hat Enterprise Linux 8.1 Extended Update Support | nodejs:12-8010020201006223055.c27ad7f8 | RHSA-2020:4903 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-nodejs12-nodejs-0:12.18.4-3.el7 | RHSA-2020:5086 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-nodejs10-nodejs-0:10.23.1-2.el7 | RHSA-2021:0521 |
Frequently Asked Questions
Is CVE-2020-15095 in your dependencies?
Find it across npm, including transitive dependencies.