{"id":"CVE-2019-16777","published":"2019-12-13T01:00:21Z","modified":"2024-08-05T01:24:47Z","title":"Arbitrary File Overwrite in npm CLI","vendor":"npm","product":"cli","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.7,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02126,"percentile":0.81857,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli","tags":["x_refsource_MISC"]},{"url":"https://github.com/npm/cli/security/advisories/GHSA-4328-8hgf-7wjr","tags":["x_refsource_CONFIRM"]},{"url":"https://www.oracle.com/security-alerts/cpujan2020.html","tags":["x_refsource_MISC"]},{"url":"http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html","tags":["vendor-advisory","x_refsource_SUSE"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://access.redhat.com/errata/RHEA-2020:0330","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0573","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0579","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0597","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://access.redhat.com/errata/RHSA-2020:0602","tags":["vendor-advisory","x_refsource_REDHAT"]},{"url":"https://security.gentoo.org/glsa/202003-48","tags":["vendor-advisory","x_refsource_GENTOO"]}],"priority":{"score":21.8,"factors":[{"name":"EPSS percentile","points":16.37},{"name":"CVSS severity","points":5.39}]},"vendorSlug":"npm","affectedVersions":[{"vendor":"npm","product":"cli","versions":[">= < 6.13.4, < 6.13.4"]}],"affected":[{"ecosystem":"npm","package":"npm","vulnerableRanges":["<6.13.4"],"patched":["6.13.4"],"from":["GHSA-4328-8hgf-7wjr"],"provenance":"source"}],"euvd":{"id":"EUVD-2019-0774","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2018-7408","published":"2018-02-22","fixed":"5.7.1","kev":false},{"cve":"CVE-2019-16775","published":"2019-12-13","fixed":"6.13.3","kev":false},{"cve":"CVE-2019-16776","published":"2019-12-13","fixed":"6.13.3","kev":false,"link":{"from":"CVE-2019-16776","to":"CVE-2019-16777","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:npm","fromFixed":"6.13.3","toFixed":"6.13.4","daysApart":0}]}},{"cve":"CVE-2019-16777","published":"2019-12-13","fixed":"6.13.4","kev":false},{"cve":"CVE-2020-15095","published":"2020-07-07","fixed":"6.14.6","kev":false,"link":{"from":"CVE-2019-16777","to":"CVE-2020-15095","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:npm","fromFixed":"6.13.4","toFixed":"6.14.6","daysApart":207}]}},{"cve":"CVE-2022-29244","published":"2022-06-13","fixed":"8.11.0","kev":false}],"package":"npm:npm"}}