Path Traversal in Npm Cli
CVE-2019-16776
Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It fails to prevent access to folders outside of the intended node_modules folder through the bin field. A properly constructed entry in the package.json bin field would allow a package publisher to modify and/or gain access to arbitrary files on a user's system when the package is installed. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
Vulnerability class: Path Traversal (Directory Traversal)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.7 (High). Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:N.
EPSS exploit prediction
EPSS: 0.034 (88.9th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 89th percentile — 88.9% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.034 · newest: 0.034 · change: 0.000
Affected products
- Npm Cli — versions < 6.13.3
- Npmjs Npm
- Oracle Graalvm — versions 19.3.0.2
- Fedoraproject Fedora — versions 31
- openSUSE Leap — versions 15.1
- Red Hat Enterprise Linux — versions 8.0
- Red Hat Enterprise Linux Eus — versions 8.1
Weakness classification (CWE)
References
- blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli (Third Party Advisory)
- github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46 (Third Party Advisory)
- www.oracle.com/security-alerts/cpujan2020.html (Third Party Advisory)
- lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html (vendor-advisory, Mailing List, Third Party Advisory)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/… (vendor-advisory)
- access.redhat.com/errata/RHEA-2020:0330 (vendor-advisory, Third Party Advisory)
- access.redhat.com/errata/RHSA-2020:0573 (vendor-advisory, Third Party Advisory)
- access.redhat.com/errata/RHSA-2020:0579 (vendor-advisory, Third Party Advisory)
- access.redhat.com/errata/RHSA-2020:0597 (vendor-advisory, Third Party Advisory)
- access.redhat.com/errata/RHSA-2020:0602 (vendor-advisory, Third Party Advisory)
Frequently asked questions
- What is CVE-2019-16776?
- CVE-2019-16776 is a high-severity vulnerability in Npm Cli, classified under Path Traversal. CVSS score: 7.7/10. Published 2019-12-13.
- How severe is CVE-2019-16776?
- High severity. CVSS v3 base score is 7.7 out of 10.