CVE-2019-16777: npm - Arbitrary File Overwrite
- Cve: CVE-2019-16777
- Name: npm - Arbitrary File Overwrite
- 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.
- Impact: Attackers can overwrite existing binaries, potentially leading to privilege escalation or execution of malicious code.
- Remediation: Update npm CLI to version 6.13.4 or later.
- Vulnerability type: file_inclusion
- Vulnerability impact: file_system_write, privilege_escalation
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 6.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
- Epss score: 0.02043
- Epss percentile: 0.81662
- Assignee: [email protected]
- Published at: 2019-12-13T01:15:11Z
- Age in days: 2538
- Modified at: 2026-06-17T02:22:46Z
- Patch available: yes
- References total: 11
- Products total: 6
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2019-16777
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory |
| CWE-269 | Improper Privilege Management |
References
Same in every row:
- Source: nvd
| 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://security.gentoo.org/glsa/202003-48 | Third Party Advisory |
| https://www.oracle.com/security-alerts/cpujan2020.html | Third Party Advisory |
Products
Same in every row:
- Platform bound: no
- Sources: nvd
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| npm/cli | package, security_advisory | yes | /v1/repositories/npm/cli |
Index
- Repositories: 9
- Repositories high signal: 4
- Packages: 1
Exploitation
- Remote: yes
- Authentication required: yes
- Exposed hosts: 49161
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports