# CVE-2019-16777: Arbitrary File Overwrite in npm CLI

- Severity: High 7.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.03%, higher than 81% of CVEs (2026-12-01)
- Published: 2019-12-13T01:00:21.000Z
- Modified: 2026-09-10T03:48:45.579Z
- Also known as: GHSA-4328-8hgf-7wjr
- Weaknesses: CWE-22, CWE-269
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- npm cli: from < 6.13.4 before 6.13.4
- npm (npm): before 6.13.4
- npmjs npm: before 6.13.4
- opensuse leap: 15.1
- oracle graalvm: 19.3.0.2
- fedoraproject fedora: 31
- redhat enterprise_linux: 8.0
- redhat enterprise_linux_eus: 8.1

## Every score

- GitHub_M: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- GitHub: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N`
- NVD: CVSS:2.0 5.5 Medium `AV:N/AC:L/Au:S/C:N/I:P/A:P`

## References

- <https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli> (third-party-advisory, web)
- <https://github.com/npm/cli/security/advisories/GHSA-4328-8hgf-7wjr> (third-party-advisory, web)
- <https://www.oracle.com/security-alerts/cpujan2020.html> (third-party-advisory, web)
- <http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html> (mailing-list, third-party-advisory, vendor-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/> (vendor-advisory)
- <https://access.redhat.com/errata/RHEA-2020:0330> (third-party-advisory, vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2020:0573> (third-party-advisory, vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2020:0579> (third-party-advisory, vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2020:0597> (third-party-advisory, vendor-advisory, web)
- <https://access.redhat.com/errata/RHSA-2020:0602> (third-party-advisory, vendor-advisory, web)
- <https://security.gentoo.org/glsa/202003-48> (third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2019-16777> (advisory)
- <https://github.com/advisories/GHSA-4328-8hgf-7wjr> (advisory)
- <https://github.com/npm/cli> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP> (web)
- <https://www.npmjs.com/advisories/1437> (web)

## Sources

- CVE List: [CVE-2019-16777](https://www.cve.org/CVERecord?id=CVE-2019-16777), CVE Terms of Use, modified 2024-08-05
- GitHub Advisory Database: [GHSA-4328-8hgf-7wjr](https://github.com/advisories/GHSA-4328-8hgf-7wjr), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2019-16777](https://nvd.nist.gov/vuln/detail/CVE-2019-16777), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2019-16777 · Whole record: https://cve.day/CVE-2019-16777.json · Rebuilt by cve.day 2026-11-25T22:57:48.765Z
