Unauthorized File Access in npm CLI before before version 6.13.3
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Partial Red Hat: 7 fixed, 1 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| npm | cli | < 6.13.3 to before 6.13.3 | 6.13.3 | Patch available | CNA |
| — | npm (npm) | before 6.13.3 | 6.13.3 | Patch available | GHSA-x8qc-rrcw-4r46 |
- cli Vendornpm Affected < 6.13.3 to before 6.13.3 Fixed in 6.13.3 Patch available CNA
- npm (npm) Vendor— Affected before 6.13.3 Fixed in 6.13.3 Patch available GHSA-x8qc-rrcw-4r46
CPE configurations NVD · 6
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:* | before 6.13.3 | Vulnerable | Npmjs |
| cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:* | 15.1 | Vulnerable | openSUSE |
| cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:* | 19.3.0.2 | Vulnerable | Oracle |
| cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* | 31 | Vulnerable | Fedoraproject |
| cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* | 8.0 | Vulnerable | Red Hat |
| cpe:2.3:o:redhat:enterprise_linux_eus:8.1:*:*:*:*:*:*:* | 8.1 | Vulnerable | Red Hat |
- cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:* Versions before 6.13.3 Vulnerable ·Npmjs
- cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:* Versions 15.1 Vulnerable ·openSUSE
- cpe:2.3:a:oracle:graalvm:19.3.0.2:*:*:*:enterprise:*:*:* Versions 19.3.0.2 Vulnerable ·Oracle
- cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:* Versions 31 Vulnerable ·Fedoraproject
- cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:*:*:*:* Versions 8.0 Vulnerable ·Red Hat
- cpe:2.3:o:redhat:enterprise_linux_eus:8.1:*:*:*:*:*:*:* Versions 8.1 Vulnerable ·Red Hat
Remediation
- Fix · CNA cli (npm) Fixed in 6.13.3
- Fix · GHSA-x8qc-rrcw-4r46 npm (npm) Fixed in 6.13.3 Advisory →
Red Hat 5 advisories
- RHSA-2020:2625 Released 2020-06-19 · Red Hat rating Moderaterh-nodejs8-nodejs security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-nodejs8-nodejs-8.17.0-2.el7, rh-nodejs8-nodejs-devel-8.17.0-2.el7, rh-nodejs8-nodejs-docs-8.17.0-2.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-nodejs8-nodejs-8.17.0-2.el7, rh-nodejs8-nodejs-devel-8.17.0-2.el7, rh-nodejs8-nodejs-docs-8.17.0-2.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-nodejs8-nodejs-8.17.0-2.el7, rh-nodejs8-nodejs-devel-8.17.0-2.el7, rh-nodejs8-nodejs-docs-8.17.0-2.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-nodejs8-nodejs-8.17.0-2.el7, rh-nodejs8-nodejs-devel-8.17.0-2.el7, rh-nodejs8-nodejs-docs-8.17.0-2.el7 +1
- RHSA-2020:0602 Released 2020-02-25 · Red Hat rating Importantrh-nodejs12-nodejs security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-nodejs12-nodejs-12.16.1-1.el7, rh-nodejs12-nodejs-devel-12.16.1-1.el7, rh-nodejs12-nodejs-docs-12.16.1-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-nodejs12-nodejs-12.16.1-1.el7, rh-nodejs12-nodejs-devel-12.16.1-1.el7, rh-nodejs12-nodejs-docs-12.16.1-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-nodejs12-nodejs-12.16.1-1.el7, rh-nodejs12-nodejs-devel-12.16.1-1.el7, rh-nodejs12-nodejs-docs-12.16.1-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-nodejs12-nodejs-12.16.1-1.el7, rh-nodejs12-nodejs-devel-12.16.1-1.el7, rh-nodejs12-nodejs-docs-12.16.1-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-nodejs12-nodejs-12.16.1-1.el7, rh-nodejs12-nodejs-devel-12.16.1-1.el7, rh-nodejs12-nodejs-docs-12.16.1-1.el7 +1
- RHSA-2020:0597 Released 2020-02-25 · Red Hat rating Importantrh-nodejs10-nodejs security update
- Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) rh-nodejs10-nodejs-10.19.0-1.el7, rh-nodejs10-nodejs-devel-10.19.0-1.el7, rh-nodejs10-nodejs-docs-10.19.0-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) rh-nodejs10-nodejs-10.19.0-1.el7, rh-nodejs10-nodejs-devel-10.19.0-1.el7, rh-nodejs10-nodejs-docs-10.19.0-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) rh-nodejs10-nodejs-10.19.0-1.el7, rh-nodejs10-nodejs-devel-10.19.0-1.el7, rh-nodejs10-nodejs-docs-10.19.0-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) rh-nodejs10-nodejs-10.19.0-1.el7, rh-nodejs10-nodejs-devel-10.19.0-1.el7, rh-nodejs10-nodejs-docs-10.19.0-1.el7 +1
- Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) rh-nodejs10-nodejs-10.19.0-1.el7, rh-nodejs10-nodejs-devel-10.19.0-1.el7, rh-nodejs10-nodejs-docs-10.19.0-1.el7 +1
Show 2 more Red Hat advisories
- RHSA-2020:0579 Released 2020-02-25 · Red Hat rating Importantnodejs:10 security update
- Red Hat Enterprise Linux AppStream (v. 8) nodejs-1:10.19.0-1.module+el8.1.0+5726+6ed65f8c.aarch64::nodejs:10, nodejs-1:10.19.0-1.module+el8.1.0+5726+6ed65f8c.ppc64le::nodejs:10, nodejs-1:10.19.0-1.module+el8.1.0+5726+6ed65f8c.s390x::nodejs:10 +15
- RHSA-2020:0573 Released 2020-02-24 · Red Hat rating Importantnodejs:10 security update
- Red Hat Enterprise Linux AppStream E4S (v. 8.0) nodejs-1:10.19.0-1.module+el8.0.0+5738+1362a79c.ppc64le::nodejs:10, nodejs-1:10.19.0-1.module+el8.0.0+5738+1362a79c.src::nodejs:10, nodejs-1:10.19.0-1.module+el8.0.0+5738+1362a79c.x86_64::nodejs:10 +9
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
npm cli — openSUSE-SU-2020:0059
3 records Highest priority Priority MEDIUM 2 MEDIUM, 1 LOW
Other records, highest priority first
- TI-2019-12555 Unauthorized File Access in npm CLI before before version 6.13.3Priority MEDIUM 40
- TI-2019-12557 Arbitrary File Overwrite in npm CLIPriority LOW 38
- Advisory ·
npm cli — RHEA-2020:0330
3 records Highest priority Priority MEDIUM 2 MEDIUM, 1 LOW
Other records, highest priority first
- TI-2019-12555 Unauthorized File Access in npm CLI before before version 6.13.3Priority MEDIUM 40
- TI-2019-12557 Arbitrary File Overwrite in npm CLIPriority LOW 38
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat OpenShift Application Runtimes | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2020:0579 |
| Red Hat Enterprise Linux AppStream E4S (v. 8.0) | Fixed | RHSA-2020:0573 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server (v. 7) | Fixed | RHSA-2020:0597, RHSA-2020:0602, RHSA-2020:2625 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.5) | Fixed | RHSA-2020:0597, RHSA-2020:0602 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.6) | Fixed | RHSA-2020:0597, RHSA-2020:0602, RHSA-2020:2625 |
| Red Hat Software Collections for Red Hat Enterprise Linux Server EUS (v. 7.7) | Fixed | RHSA-2020:0597, RHSA-2020:0602, RHSA-2020:2625 |
| Red Hat Software Collections for Red Hat Enterprise Linux Workstation (v. 7) | Fixed | RHSA-2020:0597, RHSA-2020:0602, RHSA-2020:2625 |
Timeline
- 2026-10-02 Threatist record created from CVE-2019-16776
- 2026-10-03 Alias added: GHSA-x8qc-rrcw-4r46
References
Advisory 12
- https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli
- https://github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46
- https://www.oracle.com/security-alerts/cpujan2020.html
- openSUSE-SU-2020:0059
- FEDORA-2020-595ce5e3cc
- RHEA-2020:0330
- RHSA-2020:0573
- RHSA-2020:0579
- RHSA-2020:0597
- RHSA-2020:0602
- https://nvd.nist.gov/vuln/detail/CVE-2019-16776
- https://github.com/advisories/GHSA-x8qc-rrcw-4r46
Sources
- CVE-2019-16776 · CVE Program
- CVE-2019-16776 · NVD
- FIRST EPSS
- GHSA-x8qc-rrcw-4r46 · GitHub Advisory Database · CC BY 4.0
- CVE-2019-16776 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences