CVE-2019-16776
npm symlink reference outside of node_modules
Description
Versions of the npm CLI prior to 6.13.3 are vulnerable to a symlink reference outside of node_modules. It is possible for packages to create symlinks to files outside of thenode_modules folder through the bin field upon installation. A properly constructed entry in the package.json bin field would allow a package publisher to create a symlink pointing to arbitrary files on a user’s system when the package is installed. Only files accessible by the user running the npm install are affected.
This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
Recommendation
Upgrade to version 6.13.3 or later.
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.webjars » npmvia npm npm | < 6.13.3 | 6.13.3 |
| org.webjars.npm » npmvia npm npm | < 6.13.3 | 6.13.3 |
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-16776 | nvd.nist.gov |
| Advisory | GitHub advisory GHSA-x8qc-rrcw-4r46 | github.com |
| Web | npm/cli advisory GHSA-x8qc-rrcw-4r46 | 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 | advisories/1436 | npmjs.com |
| Web | security-alerts/cpujan2020.html | oracle.com |
| Web | opensuse-security-announce/2020-01/msg00027.html | lists.opensuse.org |
