NodeJS/npm/5.10.0-next.0
a package manager for JavaScript
https://www.npmjs.com/package/npm
Artistic-2.0
5 Security Vulnerabilities
Duplicate Advisory: npm cli Uncontrolled Search Path Element Local Privilege Escalation Vulnerability
Duplicate Advisory
This advisory has been withdrawn because describes a dependency bump and therefore, per CVE CNA rule 4.1.12, is a duplicate of GHSA-34x7-hfp2-rc4v/CVE-2026-24842. Additionally, per https://github.com/npm/cli/issues/8939#issuecomment-3862719883, npm cli should not be listed as an affected product. This link is maintained to preserve external references.
Original Description
npm cli Incorrect Permission Assignment Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of npm cli. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
The specific flaw exists within the handling of modules. The application loads modules from an unsecured location. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of a target user.
npm Vulnerable to Global node_modules Binary Overwrite
- https://github.com/npm/cli/security/advisories/GHSA-4328-8hgf-7wjr
- https://nvd.nist.gov/vuln/detail/CVE-2019-16777
- https://github.com/advisories/GHSA-4328-8hgf-7wjr
- https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli
- https://www.npmjs.com/advisories/1437
- https://access.redhat.com/errata/RHEA-2020:0330
- https://access.redhat.com/errata/RHSA-2020:0573
- https://access.redhat.com/errata/RHSA-2020:0579
- https://access.redhat.com/errata/RHSA-2020:0597
- https://access.redhat.com/errata/RHSA-2020:0602
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/
- https://security.gentoo.org/glsa/202003-48
- https://www.oracle.com/security-alerts/cpujan2020.html
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html
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.
Recommendation
Upgrade to version 6.13.4 or later.
npm CLI exposing sensitive information through logs
- https://github.com/npm/cli/security/advisories/GHSA-93f3-23rq-pjfp
- https://nvd.nist.gov/vuln/detail/CVE-2020-15095
- https://github.com/advisories/GHSA-93f3-23rq-pjfp
- https://github.com/npm/cli/commit/a9857b8f6869451ff058789c4631fadfde5bbcbc
- https://github.com/npm/cli/blob/66aab417f836a901f8afb265251f761bb0422463/CHANGELOG.md#6146-2020-07-07
- http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00011.html
- http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00015.html
- http://lists.opensuse.org/opensuse-security-announce/2020-10/msg00023.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/4OOYAMJVLLCLXDTHW3V5UXNULZBBK4O6/
- https://security.gentoo.org/glsa/202101-07
Versions of the npm CLI prior to 6.14.6 are vulnerable to an information exposure vulnerability through log files. The CLI supports URLs like <protocol>://[<user>[:<password>]@]<hostname>[:<port>][:][/]<path>. The password value is not redacted and is printed to stdout and also to any generated log files.
Arbitrary File Write in npm
- https://github.com/npm/cli/security/advisories/GHSA-m6cx-g6qm-p2cx
- https://nvd.nist.gov/vuln/detail/CVE-2019-16775
- https://github.com/advisories/GHSA-m6cx-g6qm-p2cx
- https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli
- https://www.npmjs.com/advisories/1434
- https://access.redhat.com/errata/RHEA-2020:0330
- https://access.redhat.com/errata/RHSA-2020:0573
- https://access.redhat.com/errata/RHSA-2020:0579
- https://access.redhat.com/errata/RHSA-2020:0597
- https://access.redhat.com/errata/RHSA-2020:0602
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/
- https://www.oracle.com/security-alerts/cpujan2020.html
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html
- https://www.oracle.com/security-alerts/cpuoct2021.html
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.
npm symlink reference outside of node_modules
- https://github.com/npm/cli/security/advisories/GHSA-x8qc-rrcw-4r46
- https://nvd.nist.gov/vuln/detail/CVE-2019-16776
- https://github.com/advisories/GHSA-x8qc-rrcw-4r46
- https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli
- https://www.npmjs.com/advisories/1436
- https://access.redhat.com/errata/RHEA-2020:0330
- https://access.redhat.com/errata/RHSA-2020:0573
- https://access.redhat.com/errata/RHSA-2020:0579
- https://access.redhat.com/errata/RHSA-2020:0597
- https://access.redhat.com/errata/RHSA-2020:0602
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Z36UKPO5F3PQ3Q2POMF5LEKXWAH5RUFP/
- https://www.oracle.com/security-alerts/cpujan2020.html
- http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00027.html
Versions of the npm CLI prior to 6.13.3 are vulnerable to a symlink reference outside of nodemodules. It is possible for packages to create symlinks to files outside of the`nodemodulesfolder through thebinfield 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 thenpm 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.
617 Other Versions
| Version | License | Security | Released | |
|---|---|---|---|---|
| 8.5.2 | Artistic-2.0 | 2 | 2022-02-24 - 21:22 | over 4 years |
| 8.5.1 | Artistic-2.0 | 2 | 2022-02-17 - 21:35 | almost 5 years |
| 8.5.0 | Artistic-2.0 | 2 | 2022-02-10 - 21:36 | almost 5 years |
| 8.4.1 | Artistic-2.0 | 2 | 2022-02-03 - 20:13 | almost 5 years |
| 8.4.0 | Artistic-2.0 | 2 | 2022-01-27 - 21:09 | almost 5 years |
| 8.3.2 | Artistic-2.0 | 2 | 2022-01-20 - 22:01 | almost 5 years |
| 8.3.1 | Artistic-2.0 | 2 | 2022-01-13 - 20:34 | almost 5 years |
| 8.3.0 | Artistic-2.0 | 2 | 2021-12-09 - 21:15 | almost 5 years |
| 8.2.0 | Artistic-2.0 | 2 | 2021-12-02 - 21:55 | almost 5 years |
| 8.1.4 | Artistic-2.0 | 2 | 2021-11-18 - 20:46 | about 5 years |
| 8.1.3 | Artistic-2.0 | 2 | 2021-11-04 - 20:35 | about 5 years |
| 8.1.2 | Artistic-2.0 | 2 | 2021-10-28 - 19:53 | about 5 years |
| 8.1.1 | Artistic-2.0 | 2 | 2021-10-21 - 19:29 | about 5 years |
| 8.1.0 | Artistic-2.0 | 2 | 2021-10-14 - 22:10 | about 5 years |
| 8.0.0 | Artistic-2.0 | 2 | 2021-10-07 - 20:11 | about 5 years |
| 7.24.2 | Artistic-2.0 | 2 | 2021-10-04 - 17:16 | about 5 years |
| 7.24.1 | Artistic-2.0 | 2 | 2021-09-23 - 20:36 | about 5 years |
| 7.24.0 | Artistic-2.0 | 2 | 2021-09-16 - 21:52 | about 5 years |
| 7.23.0 | Artistic-2.0 | 2 | 2021-09-09 - 19:53 | about 5 years |
| 7.22.0 | Artistic-2.0 | 2 | 2021-09-02 - 20:00 | about 5 years |
| 7.21.1 | Artistic-2.0 | 2 | 2021-08-26 - 20:19 | about 5 years |
| 7.21.0 | Artistic-2.0 | 2 | 2021-08-19 - 17:26 | over 5 years |
| 7.20.6 | Artistic-2.0 | 2 | 2021-08-12 - 19:47 | over 5 years |
| 7.20.5 | Artistic-2.0 | 2 | 2021-08-05 - 20:41 | over 5 years |
| 7.20.4 | Artistic-2.0 | 2 | 2021-08-05 - 19:17 | over 5 years |
| 7.20.3 | Artistic-2.0 | 2 | 2021-07-29 - 16:04 | over 5 years |
| 7.20.2 | Artistic-2.0 | 2 | 2021-07-27 - 16:25 | over 5 years |
| 7.20.1 | Artistic-2.0 | 2 | 2021-07-22 - 20:27 | over 5 years |
| 7.20.0 | Artistic-2.0 | 2 | 2021-07-15 - 19:47 | over 5 years |
| 7.19.1 | Artistic-2.0 | 2 | 2021-07-01 - 17:26 | over 5 years |
| 7.19.0 | Artistic-2.0 | 2 | 2021-06-24 - 21:31 | over 5 years |
| 7.18.1 | Artistic-2.0 | 2 | 2021-06-17 - 18:54 | over 5 years |
| 7.18.0 | Artistic-2.0 | 2 | 2021-06-17 - 18:12 | over 5 years |
| 7.17.0 | Artistic-2.0 | 2 | 2021-06-10 - 20:39 | over 5 years |
| 7.16.0 | Artistic-2.0 | 2 | 2021-06-03 - 19:46 | over 5 years |
| 7.15.1 | Artistic-2.0 | 2 | 2021-05-31 - 22:41 | over 5 years |
| 7.15.0 | Artistic-2.0 | 2 | 2021-05-27 - 20:25 | over 5 years |
| 7.14.0 | Artistic-2.0 | 2 | 2021-05-20 - 19:28 | over 5 years |
| 7.13.0 | Artistic-2.0 | 2 | 2021-05-13 - 20:06 | over 5 years |
| 7.12.1 | Artistic-2.0 | 2 | 2021-05-10 - 21:26 | over 5 years |
| 7.12.0 | Artistic-2.0 | 2 | 2021-05-06 - 19:53 | over 5 years |
| 7.11.2 | Artistic-2.0 | 2 | 2021-04-29 - 19:51 | over 5 years |
| 7.11.1 | Artistic-2.0 | 2 | 2021-04-23 - 22:46 | over 5 years |
| 7.11.0 | Artistic-2.0 | 2 | 2021-04-23 - 04:41 | over 5 years |
| 7.10.0 | Artistic-2.0 | 2 | 2021-04-15 - 17:59 | over 5 years |
| 7.9.0 | Artistic-2.0 | 2 | 2021-04-08 - 17:44 | over 5 years |
| 7.8.0 | Artistic-2.0 | 1 | 2021-04-01 - 20:05 | over 5 years |
| 7.7.6 | Artistic-2.0 | 1 | 2021-03-29 - 19:23 | over 5 years |
| 7.7.5 | Artistic-2.0 | 1 | 2021-03-25 - 22:05 | over 5 years |
| 7.7.4 | Artistic-2.0 | 1 | 2021-03-24 - 21:19 | over 5 years |
