CVE-2019-16777: Arbitrary File Overwrite in npm CLI
Noroxi assessment
Priority: Monitor (action score 27/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 2% (FIRST EPSS); higher than 81.4% of all records.
- Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: nodejs-nodemon (AlmaLinux:8) 1.18.3-1.module_el8.3.0+2023+d2377ea3, 1.18.3-1.module_el8.3.0+2047+b07ac28e; nodejs-packaging (AlmaLinux:8) 17-3.module_el8.4.0+2521+c668cc9f, 17-3.module_el8.4.0+2224+b07ac28e, 17-3.module_el8.3.0+2023+d2377ea3; npm (Debian:12) 6.13.4+ds-2.
- Mentioned 1 time in Turkish national cyber security advisories (siberguvenlik.gov.tr).
Low priority for now. Upgrade to nodejs-nodemon (AlmaLinux:8) 1.18.3-1.module_el8.3.0+2023+d2377ea3, 1.18.3-1.module_el8.3.0+2047+b07ac28e; nodejs-packaging (AlmaLinux:8) 17-3.module_el8.4.0+2521+c668cc9f, 17-3.module_el8.4.0+2224+b07ac28e, 17-3.module_el8.3.0+2023+d2377ea3; npm (Debian:12) 6.13.4+ds-2 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
Versions of the npm CLI prior to 6.13.4 are vulnerable to an Arbitrary File Overwrite. It fails to prevent existing globally-installed binaries to be overwritten by other package installations. For example, if a package was installed globally and created a serve binary, any subsequent installs of packages that also create a serve binary would overwrite the previous serve binary. This behavior is still allowed in local installations and also through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
- Published
- Dec 12, 2019
- Updated
- Jun 16, 2026
- EPSS
- 2.0% · 81th percentile
- CWE
- CWE-22
Report tools
Action score
27
Low priority for now.
- CVSS
- 26 / 40 · 6.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 2.0%
CNA vs NVD score
- NVD
- 6.5
- CNA · GitHub_M
- 7.7
- 1.2 point gap
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| npmjs | npm | cpe:2.3:a:npmjs:npm |
| opensuse | leap | cpe:2.3:o:opensuse:leap |
| oracle | graalvm | cpe:2.3:a:oracle:graalvm |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| redhat | enterprise linux | cpe:2.3:o:redhat:enterprise_linux |
| redhat | enterprise linux eus | cpe:2.3:o:redhat:enterprise_linux_eus |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
npm cli
- < 6.13.4 and later · before 6.13.4affected
Affected versions · NVD (6)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- fedoraproject fedora31
- npmjs npmbefore 6.13.4
- opensuse leap15.1
- oracle graalvm19.3.0.2
- redhat enterprise linux8.0
- redhat enterprise linux eus8.1
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | nodejs-nodemon | before 1.18.3-1.module_el8.3.0+2023+d2377ea3 | 1.18.3-1.module_el8.3.0+2023+d2377ea3 |
| AlmaLinux:8 | nodejs-nodemon | before 1.18.3-1.module_el8.3.0+2047+b07ac28e | 1.18.3-1.module_el8.3.0+2047+b07ac28e |
| AlmaLinux:8 | nodejs-packaging | before 17-3.module_el8.4.0+2521+c668cc9f | 17-3.module_el8.4.0+2521+c668cc9f |
| AlmaLinux:8 | nodejs-packaging | before 17-3.module_el8.4.0+2224+b07ac28e | 17-3.module_el8.4.0+2224+b07ac28e |
| AlmaLinux:8 | nodejs-packaging | before 17-3.module_el8.3.0+2023+d2377ea3 | 17-3.module_el8.3.0+2023+d2377ea3 |
| Debian:12 | npm | before 6.13.4+ds-2 | 6.13.4+ds-2 |
| npm | npm | before 6.13.4 | 6.13.4 |
| openSUSE:Leap 15.1 | nodejs8 | before 8.17.0-lp151.2.9.1 | 8.17.0-lp151.2.9.1 |
| Red Hat:enterprise_linux:8::appstream | nodejs | before 1:12.14.1-1.module+el8.1.0+5466+30f75629 | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs | before 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-debuginfo | before 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-debuginfo | before 1:12.14.1-1.module+el8.1.0+5466+30f75629 | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-debugsource | before 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-debugsource | before 1:12.14.1-1.module+el8.1.0+5466+30f75629 | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-devel | before 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-devel | before 1:12.14.1-1.module+el8.1.0+5466+30f75629 | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-devel-debuginfo | before 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-docs | before 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c | 1:10.19.0-1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | nodejs-docs | before 1:12.14.1-1.module+el8.1.0+5466+30f75629 | 1:12.14.1-1.module+el8.1.0+5466+30f75629 |
| Red Hat:enterprise_linux:8::appstream | nodejs-nodemon | before 0:1.18.3-1.module+el8.1.0+3369+37ae6a45 | 0:1.18.3-1.module+el8.1.0+3369+37ae6a45 |
| Red Hat:enterprise_linux:8::appstream | nodejs-packaging | before 0:17-3.module+el8.1.0+3369+37ae6a45 | 0:17-3.module+el8.1.0+3369+37ae6a45 |
| Red Hat:enterprise_linux:8::appstream | npm | before 1:6.13.4-1.10.19.0.1.module+el8.1.0+5726+6ed65f8c | 1:6.13.4-1.10.19.0.1.module+el8.1.0+5726+6ed65f8c |
| Red Hat:enterprise_linux:8::appstream | npm | before 1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629 | 1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629 |
| Red Hat:rhel_e4s:8.0::appstream | nodejs | before 1:10.19.0-1.module+el8.0.0+5738+1362a79c | 1:10.19.0-1.module+el8.0.0+5738+1362a79c |
+29
Same product
npmjs: all recordsOther highest-scoring records for the same primary product.
- CVE-2021-43616The npm ci command in npm 7.x and 8.x through 8.1.3 proceeds with an installation even if dependency information in package-lock.json…40Plan
- CVE-2019-16776Unauthorized File Access in npm CLI before before version 6.13.333Monitor
- CVE-2022-29244npm packing does not respect root-level ignore files in workspaces31Monitor
Published before and after this one in the same product
- ← EarlierCVE-2018-7408Feb 22, 2018 · An issue was discovered in an npm 5.7.0 2018-02-21 pre-release (marked as "next: 5.7.0" and therefore automatically installed by an "npm…31Monitor
- Later →CVE-2020-15095Jul 7, 2020 · Sensitive information exposure through logs in npm cli17Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:nodejs-nodemon | 1.18.3-1.module_el8.3.0+2023+d2377ea3 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:nodejs-packaging | 17-3.module_el8.4.0+2224+b07ac28e · AlmaLinux:8 | Package registry (OSV) |
| debian:npm | 6.13.4+ds-2 · Debian:12 | Package registry (OSV) |
| npm:npm | 6.13.4 | Package registry (OSV) |
| opensuse:nodejs8 | 8.17.0-lp151.2.9.1 · openSUSE:Leap 15.1 | Package registry (OSV) |
| red hat:nodejs | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:nodejs-debuginfo | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:nodejs-debugsource | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:nodejs-devel | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:nodejs-devel-debuginfo | 1:10.19.0-1.module+el8.0.0+5738+1362a79c · Red Hat:rhel_e4s:8.0::appstream | Package registry (OSV) |
| red hat:nodejs-docs | 1:12.14.1-1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:nodejs-nodemon | 0:1.18.3-1.module+el8.1.0+3369+37ae6a45 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:nodejs-packaging | 0:17-3.module+el8.1.0+3369+37ae6a45 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:npm | 1:6.13.4-1.12.14.1.1.module+el8.1.0+5466+30f75629 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:rh-nodejs10-nodejs | 0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-nodejs10-nodejs-debuginfo | 0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| red hat:rh-nodejs10-nodejs-devel | 0:10.19.0-1.el7 · Red Hat:rhel_software_collections:3::el7 | Package registry (OSV) |
| rocky linux:nodejs-nodemon | 0:1.18.3-1.module+el8.3.0+101+f84c7154 · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:nodejs-packaging | 0:17-3.module+el8.3.0+101+f84c7154 · Rocky Linux:8 | Package registry (OSV) |
| suse:nodejs10 | 10.18.0-1.15.1 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Package registry (OSV) |
| suse:nodejs12 | 12.15.0-1.6.1 · SUSE:Linux Enterprise Module for Web and Scripting 12 | Package registry (OSV) |
| suse:nodejs6 | 6.17.1-11.30.1 · SUSE:OpenStack Cloud 7 | Package registry (OSV) |
| suse:nodejs8 | 8.17.0-3.25.1 · SUSE:Linux Enterprise Module for Web and Scripting 15 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
National notice (Türkiye Cybersecurity Directorate / USOM)
Official security notices citing this record; remediation advice is on the agency's page.
- TR-20-034 · Jan 14, 2020(Node JS Güvenlik Güncellemesi)
Not on record for this CVE: EPSS history · patch commit or PR link · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- high · data or configuration can be modified
- Availability
- none
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- High
- Availability impact
- None
Weakness class (CWE)
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
nvd-primary
Root cause
A user-supplied file name is joined with the allowed directory, but the result is never checked to confirm it is still inside that directory.
The bug in code
The whole CWE-22 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const file = path.join(ROOT, req.query.name);
res.sendFile(file);Fixed
const file = path.resolve(ROOT, req.query.name);
if (!file.startsWith(ROOT + path.sep)) {
return res.sendStatus(400);
}
res.sendFile(file);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Path TraversalCAPEC-126likelihood: High · Very High
- Using Slashes and URL Encoding Combined to Bypass Validation LogicCAPEC-64likelihood: High · High
- Manipulating Web Input to File System CallsCAPEC-76likelihood: High · Very High
- Using Escaped Slashes in Alternate EncodingCAPEC-78likelihood: High · High
- Using Slashes in Alternate EncodingCAPEC-79likelihood: High · High
ATT&CK techniques
—
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (10 more)Show less
- access.redhat.com/errata/RHEA-2020:0330
- access.redhat.com/errata/RHSA-2020:0573
- access.redhat.com/errata/RHSA-2020:0579
- access.redhat.com/errata/RHSA-2020:0597
- access.redhat.com/errata/RHSA-2020:0602
- blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli
- github.com/npm/cli/security/advisories/GHSA-4328-8hgf-7wjr
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/
- security.gentoo.org/glsa/202003-48
- www.oracle.com/security-alerts/cpujan2020.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.