{"id":"CVE-2019-16777","aliases":["CVE-2019-16777","GHSA-4328-8hgf-7wjr"],"related":[],"kind":"vulnerability","state":"published","title":"Arbitrary File Overwrite in npm CLI","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Versions of  the npm CLI prior to 6.13.4 are vulnerable to a Global node_modules Binary Overwrite. It fails to prevent existing globally-installed binaries to be overwritten by other package installations. \n\nFor 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 first binary. This will not overwrite system binaries but only binaries put into the global node_modules directory.\n\nThis behavior is still allowed in local installations and also through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.\n\n\n## Recommendation\n\nUpgrade to version 6.13.4 or later.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las versiones de la CLI npm anteriores a 6.13.4 son vulnerables a una Sobrescritura de Archivos Arbitrarios. No puede impedir que los binarios existentes instalados globalmente sean sobrescritos por otras instalaciones de paquete. Por ejemplo, si un paquete fue instalado globalmente y creó un binario de servicio, cualquier instalación posterior de paquetes que también crea un binario de servicio sobrescribirá el binario de servicio anterior. Este comportamiento todavía es permitido en instalaciones locales y también por medio de scripts de instalación. Esta vulnerabilidad omite a un usuario que usa la opción de instalación --ignore-scripts.","source":"nvd"}],"published":"2019-12-13T01:00:21.000Z","modified":"2026-09-10T03:48:45.579Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","score":7.7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:N/I:P/A:P","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-22","CWE-269"],"affected":[{"ranges":[{"type":"custom","introduced":"< 6.13.4","fixed":"6.13.4","status":"affected"}],"vendor":"npm","product":"cli","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.13.4"}],"ecosystem":"npm","package":"npm","purl":"pkg:npm/npm","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.13.4"}],"vendor":"npmjs","product":"npm","cpe":"cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"15.1"}],"vendor":"opensuse","product":"leap","cpe":"cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"19.3.0.2"}],"vendor":"oracle","product":"graalvm","cpe":"cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"31"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"8.0"}],"vendor":"redhat","product":"enterprise_linux","cpe":"cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"8.1"}],"vendor":"redhat","product":"enterprise_linux_eus","cpe":"cpe:2.3:o:redhat:enterprise_linux_eus:8.1:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/npm/cli/security/advisories/GHSA-4328-8hgf-7wjr","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.oracle.com/security-alerts/cpujan2020.html","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html","tags":["mailing-list","third-party-advisory","vendor-advisory","web","x-refsource-suse","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHEA-2020:0330","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0573","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0579","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0597","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0602","tags":["third-party-advisory","vendor-advisory","web","x-refsource-redhat","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://security.gentoo.org/glsa/202003-48","tags":["third-party-advisory","vendor-advisory","web","x-refsource-gentoo","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16777","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-4328-8hgf-7wjr","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/npm/cli","tags":["package"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP","tags":["web"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/1437","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2019-16777","url":"https://www.cve.org/CVERecord?id=CVE-2019-16777","licence":"CVE Terms of Use","modified":"2024-08-05T01:24:47.252Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4328-8hgf-7wjr","url":"https://github.com/advisories/GHSA-4328-8hgf-7wjr","licence":"CC-BY-4.0","modified":"2026-09-10T03:48:45.579Z"},{"source":"nvd","name":"NVD","id":"CVE-2019-16777","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16777","licence":"Public domain","modified":"2026-06-17T02:22:46.910Z"}],"updatedAt":"2026-11-25T22:57:48.765Z","epss":{"score":0.02026,"percentile":0.81571,"date":"2026-12-01T12:00:22.000Z"}}