December 2019 Security Releases
(Update 18-December-2019) Releases available
These releases update npm to v6.13.4 to address three vulnerabilities described below.
All current release lines were affected.
At this time, CVEs have been requested by npm, Inc. and are pending review. See https://twitter.com/ahmadnassri/status/1205132161961123841 for more information.
Global node_modules
Binary Overwrite
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.
Symlink reference outside of node_modules
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 the node_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.
Arbitrary File Write
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 overwrite 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.
Downloads
Please note that this will be the final release of the v8.x line as support ends after December 31st, 2019.
Summary
The Node.js project will release new versions of all supported release lines on or shortly after Tuesday December 17, 2019 UTC. For versions 8, 10, and 12 the only update to the runtime in these releases will be an updated version of npm addressing the vulnerability announced in https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli. Version 13, while still being a security release, will include all commits that were scheduled to be included in the originally scheduled release.
In the meantime, users should update to npm 6.13.4 by following the instructions provided in the npm advisory. As a general rule, avoid running npm in production environments.
Impact
All versions of Node.js are vulnerable including the LTS and current releases: Node.js 8 (LTS "Carbon"), Node.js 10 (LTS "Dubnium") , Node.js 12 (LTS "Erbium"), and Node.js 13.
Release timing
Releases will be available at, or shortly after, Tuesday, December 17, 2019 UTC.
Contact and future updates
The current Node.js security policy can be found at https://github.com/nodejs/node/security/policy#security. Please follow the process outlined in https://github.com/nodejs/node/security/policy if you wish to report a vulnerability in Node.js.
Subscribe to the low-volume announcement-only nodejs-sec mailing list at https://groups.google.com/forum/#!forum/nodejs-sec to stay up to date on security vulnerabilities and security-related releases of Node.js and the projects maintained in the nodejs GitHub organization.