CVE Catalog

CVE-2019-16776

HighCVSS 7.7
Published: Updated: Translated: NVD NIST

Summary

Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. Through the bin field in package.json, a package publisher can access folders outside the intended node_modules directory and modify arbitrary files on a user's system during installation. This vulnerability bypasses the --ignore-scripts install option.

Risk Assessment

A malicious npm package can overwrite or access arbitrary files on the victim's system during installation, potentially leading to code execution or compromise of the development environment.

Recommendation

Update npm CLI to version 6.13.3 or later. Install packages only from trusted sources and verify the bin field contents in package.json.

Other vulnerabilities in npm CLI

See all
Original NVD description (English source)

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 modify and/or gain access to arbitrary files on a user's system when the package is installed. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS