CVE-2019-16776
published 2019-12-13CVE-2019-16776: 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…
PriorityP352high8.1CVSS 3.1
AVNACLPRLUINSUCHIHAN
EPSS
3.34%
87.3th percentile
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.
Affected
13 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 | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux_eus | — | — |
CVSS provenance
nvdv3.18.1HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
nvdv2.05.5MEDIUMAV:N/AC:L/Au:S/C:P/I:P/A:N
osv8.1HIGH
vendor_oracle8.1HIGH
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.
GHSA
npm symlink reference outside of node_modules
ghsa·2019-12-13
CVE-2019-16776 [HIGH] CWE-22 npm symlink reference outside of node_modules
npm 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.
## Recommendation
Upgrade to version 6.13.3 or later.
OSV
CVE-2019-16776: Versions of the npm CLI prior to 6
osv·2019-12-13·CVSS 8.1
CVE-2019-16776 [HIGH] CVE-2019-16776: 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 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.
OSV
npm symlink reference outside of node_modules
osv·2019-12-13
CVE-2019-16776 [HIGH] npm symlink reference outside of node_modules
npm 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.
## Recommendation
Upgrade to version 6.13.3 or later.
Oracle
Oracle Oracle GraalVM Risk Matrix: JavaScript (Node.js) — CVE-2019-16776
vendor_oracle·2020-01-15·CVSS 8.1
CVE-2019-16776 [HIGH] Oracle Oracle GraalVM Risk Matrix: JavaScript (Node.js) — CVE-2019-16776
Oracle Oracle GraalVM Risk Matrix: JavaScript (Node.js) vulnerability
CVE: CVE-2019-16776
CVSS: 8.1
Protocol: Multiple
Remote exploit: No
Affected versions: Network
Advisory: cpujan2020 (JAN 2020)
Red Hat
npm: Arbitrary file write via constructed entry in the package.json bin field
vendor_redhat·2019-12-12·CVSS 7.7
CVE-2019-16776 [HIGH] CWE-20 npm: Arbitrary file write via constructed entry in the package.json bin field
npm: Arbitrary file write via constructed entry in the package.json bin field
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.
Package: nodejs8 (Red Hat OpenShift Application Runtimes) - Out of support scope
Debian
CVE-2019-16776: 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-16776 [HIGH] CVE-2019-16776: 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 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.
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)
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2019-16776 npm: Arbitrary file write via constructed entry in the package.json bin field
bugzilla·2020-01-06·CVSS 7.8
CVE-2019-16776 [HIGH] CVE-2019-16776 npm: Arbitrary file write via constructed entry in the package.json bin field
CVE-2019-16776 npm: Arbitrary file write via constructed entry in the package.json bin field
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.
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
Discu
Bugzilla
CVE-2019-16776 nodejs: npm: Arbitrary file write via constructed entry in the package.json bin field [epel-all]
bugzilla·2020-01-06·CVSS 7.7
CVE-2019-16776 [HIGH] CVE-2019-16776 nodejs: npm: Arbitrary file write via constructed entry in the package.json bin field [epel-all]
CVE-2019-16776 nodejs: npm: Arbitrary file write via constructed entry in the package.json bin field [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: this issue aff
Bugzilla
CVE-2019-16776 nodejs: Arbitrary file write via constructed entry in the package.json bin field [fedora-all]
bugzilla·2020-01-06·CVSS 7.7
CVE-2019-16776 [HIGH] CVE-2019-16776 nodejs: Arbitrary file write via constructed entry in the package.json bin field [fedora-all]
CVE-2019-16776 nodejs: Arbitrary file write via constructed entry in the package.json bin field [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: this issue affe
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-x8qc-rrcw-4r46https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/https://www.oracle.com/security-alerts/cpujan2020.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-x8qc-rrcw-4r46https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/https://www.oracle.com/security-alerts/cpujan2020.html
2019-12-13
Published