HIGH 7.7

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)

ArtifactAffected versionsFixed 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

2affected artifacts
43affected versions
44dependent artifacts (est.)
279dependent versions

93% of the dependent artifacts (41) still pull an affected version in their latest release.

DepthDependent versions
Direct
40
2 hops
109
3 hops
130

Most used dependents

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