CVE-2019-16775
published 2019-12-13CVE-2019-16775: Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It is possible for packages to create symlinks to files outside of…
PriorityP341medium6.5CVSS 3.1
AVNACLPRLUINSUCNIHAN
EPSS
3.27%
87.0th percentile
Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It is possible for packages to create symlinks to files outside of thenode_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. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
Affected
15 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | npm | < npm 6.13.4+ds-2 (bookworm) | npm 6.13.4+ds-2 (bookworm) |
| fedoraproject | fedora | — | — |
| npm | cli | < 6.13.3 | 6.13.3 |
| npmjs | npm | < 6.13.3 | 6.13.3 |
| npmjs | npm | >= 0 < 6.13.4+ds-2 | 6.13.4+ds-2 |
| npmjs | npm | >= 0 < 6.13.4+ds-2 | 6.13.4+ds-2 |
| npmjs | npm | >= 0 < 6.13.4+ds-2 | 6.13.4+ds-2 |
| npmjs | npm | >= 0 < 6.13.4+ds-2 | 6.13.4+ds-2 |
| npmjs | npm | >= 0 < 6.13.3 | 6.13.3 |
| opensuse | leap | — | — |
| oracle | graalvm | — | — |
| oracle | graalvm | — | — |
| oracle | graalvm | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux_eus | — | — |
CVSS provenance
nvdv3.16.5MEDIUMCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
nvdv2.04.0MEDIUMAV:N/AC:L/Au:S/C:N/I:P/A:N
osv6.5MEDIUM
vendor_debian7.7HIGH
vendor_redhat7.7HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
Red Hat
npm: Symlink reference outside of node_modules folder through the bin field upon installation
vendor_redhat·2019-12-12·CVSS 7.7
CVE-2019-16775 [HIGH] CWE-20 npm: Symlink reference outside of node_modules folder through the bin field upon installation
npm: Symlink reference outside of node_modules folder through the bin field upon installation
Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It is possible for packages to create symlinks to files outside of thenode_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. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
Package: nodejs8 (Red Hat OpenShift Application Runtimes) - Out of support scope
Debian
CVE-2019-16775: npm - Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Writ...
vendor_debian·2019·CVSS 7.7
CVE-2019-16775 [HIGH] CVE-2019-16775: npm - Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Writ...
Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It is possible for packages to create symlinks to files outside of thenode_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. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
Scope: local
bookworm: resolved (fixed in 6.13.4+ds-2)
bullseye: resolved (fixed in 6.13.4+ds-2)
forky: resolved (fixed in 6.13.4+ds-2)
sid: resolved (fixed in 6.13.4+ds-2)
trixie: resolved (fixed in 6.13.4+ds-2)
OSV
CVE-2019-16775: Versions of the npm CLI prior to 6
osv·2019-12-13·CVSS 6.5
CVE-2019-16775 [MEDIUM] CVE-2019-16775: Versions of the npm CLI prior to 6
Versions of the npm CLI prior to 6.13.3 are vulnerable to an Arbitrary File Write. It is possible for packages to create symlinks to files outside of thenode_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. This behavior is still possible through install scripts. This vulnerability bypasses a user using the --ignore-scripts install option.
OSV
Arbitrary File Write in npm
osv·2019-12-13
CVE-2019-16775 [HIGH] Arbitrary File Write in npm
Arbitrary File Write in npm
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.
GHSA
Arbitrary File Write in npm
ghsa·2019-12-13
CVE-2019-16775 [HIGH] CWE-59 Arbitrary File Write in npm
Arbitrary File Write in npm
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.
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2019-16775 nodejs: Symlink reference outside of node_modules folder through the bin field upon installation [fedora-all]
bugzilla·2020-01-06·CVSS 7.7
CVE-2019-16775 [HIGH] CVE-2019-16775 nodejs: Symlink reference outside of node_modules folder through the bin field upon installation [fedora-all]
CVE-2019-16775 nodejs: Symlink reference outside of node_modules folder through the bin field upon installation [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE:
Bugzilla
CVE-2019-16775 nodejs: npm: Symlink reference outside of node_modules folder through the bin field upon installation [epel-all]
bugzilla·2020-01-06·CVSS 7.7
CVE-2019-16775 [HIGH] CVE-2019-16775 nodejs: npm: Symlink reference outside of node_modules folder through the bin field upon installation [epel-all]
CVE-2019-16775 nodejs: npm: Symlink reference outside of node_modules folder through the bin field upon installation [epel-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of epel-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE
Bugzilla
CVE-2019-16775 npm: Symlink reference outside of node_modules folder through the bin field upon installation
bugzilla·2020-01-06·CVSS 7.8
CVE-2019-16775 [HIGH] CVE-2019-16775 npm: Symlink reference outside of node_modules folder through the bin field upon installation
CVE-2019-16775 npm: Symlink reference outside of node_modules folder through the bin field upon installation
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.
References:
https://www.npmjs.com/advisories/1436
https://nodejs.org/en/blog/vulnerability/december-2019-security-releases/
https://blog.npmjs.org/post/189618601100/binary-planting-with-the-np
http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.htmlhttps://access.redhat.com/errata/RHEA-2020:0330https://access.redhat.com/errata/RHSA-2020:0573https://access.redhat.com/errata/RHSA-2020:0579https://access.redhat.com/errata/RHSA-2020:0597https://access.redhat.com/errata/RHSA-2020:0602https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-clihttps://github.com/npm/cli/security/advisories/GHSA-m6cx-g6qm-p2cxhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/https://www.oracle.com/security-alerts/cpujan2020.htmlhttps://www.oracle.com/security-alerts/cpuoct2021.htmlhttp://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.htmlhttps://access.redhat.com/errata/RHEA-2020:0330https://access.redhat.com/errata/RHSA-2020:0573https://access.redhat.com/errata/RHSA-2020:0579https://access.redhat.com/errata/RHSA-2020:0597https://access.redhat.com/errata/RHSA-2020:0602https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-clihttps://github.com/npm/cli/security/advisories/GHSA-m6cx-g6qm-p2cxhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/https://www.oracle.com/security-alerts/cpujan2020.htmlhttps://www.oracle.com/security-alerts/cpuoct2021.html
2019-12-13
Published