CVE-2019-16776: Unauthorized File Access in npm CLI before before version 6.13.3

Published Dec 12, 2019
·
Updated

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 nodemodules 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 overwrite files that already exist on disk.

References:

https://www.npmjs.com/advisories/1434 https://nodejs.org/en/blog/vulnerability/december-2019-security-releases/ https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli

Other sources

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 nodemodules 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.

Affected Software

14 affected componentsFixes available
redhat/rh-nodejs10-nodejs<0:10.19.0-1.el7
0:10.19.0-1.el7
redhat/rh-nodejs12-nodejs<0:12.16.1-1.el7
0:12.16.1-1.el7
redhat/rh-nodejs8-nodejs<0:8.17.0-2.el7
0:8.17.0-2.el7
redhat/npm<6.13.3
6.13.3
redhat/nodejs<8.17.0
8.17.0
redhat/nodejs<10.18.0
10.18.0
redhat/nodejs<12.14.0
12.14.0
redhat/nodejs<13.4.0
13.4.0
npmjs npm<6.13.3
openSUSE Leap=15.1
Oracle GraalVM=19.3.0.2
Fedoraproject Fedora=31
redhat Enterprise Linux=8.0
redhat Enterprise Linux Eus=8.1

Event History

Dec 12, 2019
CVE Published
12:00 AM
Dec 13, 2019
CVE Published
via MITRE·12:55 AM
Data Sourced
via MITRE·12:55 AM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this issue?

The vulnerability ID for this issue is CVE-2019-16776.

2

What is the severity of CVE-2019-16776?

The severity of CVE-2019-16776 is high (8.1).

3

Which versions of the npm CLI are affected?

Versions of the npm CLI prior to 6.13.3 are affected.

4

How can I fix CVE-2019-16776?

To fix CVE-2019-16776, make sure to update the npm CLI to version 6.13.3 or later.

5

Where can I find more information about CVE-2019-16776?

More information about CVE-2019-16776 can be found at the following references: [npm advisory](https://www.npmjs.com/advisories/1434), [Node.js blog](https://nodejs.org/en/blog/vulnerability/december-2019-security-releases/), [npm blog](https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203