CVE-2019-16777
npm Vulnerable to Global node_modules Binary Overwrite
Description
Versions of the npm CLI prior to 6.13.4 are vulnerable to a Global node_modules Binary 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 first binary. This will not overwrite system binaries but only binaries put into the global node_modules directory.
This behavior is still allowed in local installations and also through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
Recommendation
Upgrade to version 6.13.4 or later.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.webjars » npmvia npm npm | < 6.13.4 | 6.13.4 |
| org.webjars.npm » npmvia npm npm | < 6.13.4 | 6.13.4 |
Blast radius
93% of the dependent artifacts (41) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 40 |
| 2 hops | 109 |
| 3 hops | 130 |
Most used dependents
- org.webjars.npm » jquery556 usages
- com.github.sbt » sbt-js-engine_2.12_1.013 usages
- com.github.sbt » sbt-js-engine_sbt28 usages
- com.typesafe.play » sbt-plugin_2.12_1.07 usages
- org.playframework » sbt-plugin_2.12_1.06 usages
- org.playframework » sbt-plugin_sbt23 usages
- com.github.sbt » sbt-js-engine3 usages
- org.webjars.npm » ember-cli1 usages
- org.playframework » play-docs-sbt-plugin_2.12_1.00 usages
- org.playframework » sbt-scripted-tools_2.12_1.00 usages
- com.typesafe.play » play-docs-sbt-plugin_2.12_1.00 usages
- com.typesafe.play » sbt-scripted-tools_2.12_1.00 usages
- org.playframework » sbt-play-ebean_2.12_1.00 usages
- com.typesafe.play » sbt-play-ebean_2.12_1.00 usages
- com.typesafe » npm0 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2019-16777 | nvd.nist.gov |
| Advisory | GitHub advisory GHSA-4328-8hgf-7wjr | github.com |
| Package | npm/cli | github.com |
| Web | npm/cli advisory GHSA-4328-8hgf-7wjr | github.com |
| Web | errata/RHEA-2020:0330 | access.redhat.com |
| Web | errata/RHSA-2020:0573 | access.redhat.com |
| Web | errata/RHSA-2020:0579 | access.redhat.com |
| Web | errata/RHSA-2020:0597 | access.redhat.com |
| Web | errata/RHSA-2020:0602 | access.redhat.com |
| Web | post/189618601100/binary-planting-with-the-npm-cli | blog.npmjs.org |
| Web | archives/list/package-announce@lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH ... | lists.fedoraproject.org |
| Web | glsa/202003-48 | security.gentoo.org |
| Web | advisories/1437 | npmjs.com |
| Web | security-alerts/cpujan2020.html | oracle.com |
| Web | opensuse-security-announce/2020-01/msg00027.html | lists.opensuse.org |
