CVE-2019-16777
Arbitrary File Overwrite in npm CLI
- 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.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.
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-4328-8hgf-7wjr
- 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
- GLSA-202003-48vendor-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.