CVE-2019-16777 | Arbitrary File Overwrite in npm CLI

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: 2019-12-13 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2019-16777 is rated Moderate Risk (55.4/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.59%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2019-16777

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-05-20 0.33% 0.59% +0.26%
2 2026-03-19 0.38% 0.33% -0.05%
3 2026-01-17 0.38%

Full EPSS history (16 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2019-16777

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.7 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.3 5.8 [email protected]
6.5 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 3.6 [email protected]
5.5 2.0 MEDIUM
AV:N/AC:L/Au:S/C:N/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:S)
A single authentication is required.
Confidentiality impact (C:N)
No confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
8.0 4.9 [email protected]

Weakness enumeration for CVE-2019-16777

GitHub Security Advisory for CVE-2019-16777

GHSA-4328-8hgf-7wjr · Severity: high · Ecosystem: npm — npm Vulnerable to Global node_modules Binary Overwrite

OS Trackers for CVE-2019-16777

vendor priority summary link
debian not yet assigned CVE-2019-16777 not yet assigned priority: Debian including 1 source packages (npm), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2019-16777
gentoo normal CVE-2019-16777: 1 GLSA(s) (202003-48), 1 atom(s) (net-libs/nodejs); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2019-16777
redhat low https://access.redhat.com/security/cve/CVE-2019-16777
suse high CVE-2019-16777 severity important: SUSE including 38 source package names (nodejs-12.14.1-1.module+el8.1.0+5466+30f75629, nodejs-devel-12.14.1-1.module+el8.1.0+5466+30f75629, …), 119 product×package rows across 20 product lines (SUSE Enterprise Storage 7.1, SUSE Liberty Linux 8, … (20 product lines)): Fixed 65, Known Not Affected 54. https://www.suse.com/security/cve/CVE-2019-16777/
ubuntu medium CVE-2019-16777 medium priority: Ubuntu including 1 source packages (npm), 18 status rows across 18 suites (bionic, disco, eoan, focal, groovy, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 10, needs-triage 8. https://ubuntu.com/security/CVE-2019-16777

Affected software / configurations for CVE-2019-16777

Vendor Product Version Raw CPE
npmjs npm < 6.13.4 cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:*
opensuse leap 15.1 cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*
oracle graalvm 19.3.0.2 cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:*
fedoraproject fedora 31 cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*
redhat enterprise_linux 8.0 cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*
redhat enterprise_linux_eus 8.1 cpe:2.3:o:redhat:enterprise_linux_eus:8.1:*:*:*:*:*:*:*

References for CVE-2019-16777

URL Tags
http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html Mailing List Third Party Advisory
https://access.redhat.com/errata/RHEA-2020:0330 Third Party Advisory
https://access.redhat.com/errata/RHSA-2020:0573 Third Party Advisory
https://access.redhat.com/errata/RHSA-2020:0579 Third Party Advisory
https://access.redhat.com/errata/RHSA-2020:0597 Third Party Advisory
https://access.redhat.com/errata/RHSA-2020:0602 Third Party Advisory
https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli Third Party Advisory
https://github.com/npm/cli/security/advisories/GHSA-4328-8hgf-7wjr Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/
https://security.gentoo.org/glsa/202003-48 Third Party Advisory
https://www.oracle.com/security-alerts/cpujan2020.html Third Party Advisory
cvelogic Threat Intelligence