CVE-2019-16777: Arbitrary File Overwrite in npm CLI
Vulnerability summary
CVE-2019-16777 is a high (CVSS 7.7) vulnerability in fedoraproject fedora. EPSS estimates a 2.13% chance of exploitation in the next 30 days, higher than 81.9% of scored vulnerabilities.
Not severe (CVSS 7.7, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 13 · Related 15Timeline
- 13-12-2019PublishedVulnerability first disclosed.
- 05-08-2024Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
8 scores · 7 sources · 2 versions- NVDNIST6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NDiffers
- OSV · UbuntuEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NDiffers
- OSV · DebianEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NDiffers
- OSV · WolfiEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NDiffers
- OSV · NpmEcosystem advisory · calculated7.7HighCVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N
- OSV · ChainguardEcosystem advisory · calculated6.5MediumCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:NDiffers
EPSS trend
Probability
2.13%
Chance of exploitation in the next 30 days
Percentile
82%
Versus all other CVEs
30-day change
No change 0.00 pp
From 2.13% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-22Improper Limitation of a Pathname to a Restricted DirectoryThe product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- CWE-269Improper Privilege ManagementThe product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.
Affected systems
Known conditions: network-reachable, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard74 products
- code-serverAll versions (No fix recorded)
- code-server-compatAll versions (No fix recorded)
- commercial-gitlab-rails-ee-assets-19.1All versions (No fix recorded)
- commercial-gitlab-rails-ee-assets-19.2All versions (No fix recorded)
- commercial-gitlab-rails-ee-assets-19.3All versions (No fix recorded)
Npm2 products
- cli≥ < 6.13.4, < 6.13.4
- npm< 6.13.4
Redhat2 products
Wolfi2 products
- code-serverAll versions (No fix recorded)
- code-server-compatAll versions (No fix recorded)
Debian1 product
- npm< 6.13.4+ds-2
Fedoraproject1 product
- fedoraEOL31
Npmjs1 product
- npm< 6.13.4
Opensuse1 product
- leapEOL15.1
Oracle1 product
- graalvm19.3.0.2
Ubuntu1 product
- npmAll versions (No fix recorded)
10 vendors · 86 products
References
19 links- blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cliX Refsource MISCThird Party AdvisoryREPORTAdvisoryWEB
- github.com/npm/cli/security/advisories/GHSA-4328-8hgf-7wjrX Refsource CONFIRMThird Party AdvisoryREPORTAdvisoryWEB
- lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.htmlVendor AdvisoryX Refsource SUSEMailing ListThird Party AdvisoryAdvisoryWEB
- access.redhat.com/errata/RHEA-2020:0330Vendor AdvisoryX Refsource REDHATThird Party AdvisoryAdvisoryWEB
- access.redhat.com/errata/RHSA-2020:0573Vendor AdvisoryX Refsource REDHATThird Party AdvisoryAdvisoryWEB
- access.redhat.com/errata/RHSA-2020:0579Vendor AdvisoryX Refsource REDHATThird Party AdvisoryAdvisoryWEB
- access.redhat.com/errata/RHSA-2020:0597Vendor AdvisoryX Refsource REDHATThird Party AdvisoryAdvisoryWEB
- access.redhat.com/errata/RHSA-2020:0602Vendor AdvisoryX Refsource REDHATThird Party AdvisoryAdvisoryWEB
Show all 19 references
- github.com/npm/cliPACKAGE