CVE-2019-16776
Unauthorized File Access in npm CLI before before version 6.13.3
- State
- Published
- Severity
- 7.7 High
- Published
- Dec 13, 2019
- Updated
- Aug 5, 2024
- Reserved
- Sep 24, 2019
Description
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 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_M |
Weaknesses
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Products
| Product | Versions |
|---|---|
clinpm |
|
References
- 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:0059vendor-advisory
- FEDORA-2020-595ce5e3ccvendor-advisory
- RHEA-2020:0330vendor-advisory
- RHSA-2020:0573vendor-advisory
- RHSA-2020:0579vendor-advisory
- RHSA-2020:0597vendor-advisory
- RHSA-2020:0602vendor-advisory
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.