HIGH 7.7

CVE-2019-16775

Arbitrary File Write in npm

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 create files on a user's system when the package is installed. It is only possible to affect files that the user running npm install has access to and it is not possible to over write files that already exist on disk.

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)

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

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