
CVE catalog
CVE-2021-39134
npm: CVE-2021-39134
- Severity
- High · CVSS 8.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.59% · Oct 25, 2026
`@npmcli/arborist`, the library that calculates dependency trees and manages the `node_modules` folder hierarchy for the npm command line interface, aims to guarantee that package dependency contracts will be met, and the extraction of package contents will always be performed into the expected folder. This is, in part, accomplished by resolving dependency specifiers defined in `package.json` manifests for dependencies with a specific name, and nesting folders to resolve conflicting dependencies. When multiple dependencies differ only in the case of their name, Arborist's internal data structure saw them as separate items that could coexist within the same level in the `node_modules` hierarchy. However, on case-insensitive file systems (such as macOS and Windows), this is not the case. Combined with a symlink dependency such as `file:/some/path`, this allowed an attacker to create a situation in which arbitrary contents could be written to any location on the filesystem. For example, a package `pwn-a` could define a dependency in their `package.json` file such as `"foo": "file:/some/path"`. Another package, `pwn-b` could define a dependency such as `FOO: "file:foo.tgz"`. On case-insensitive file systems, if `pwn-a` was installed, and then `pwn-b` was installed afterwards, the contents of `foo.tgz` would be written to `/some/path`, and any existing contents of `/some/path` would be removed. Anyone using npm v7.20.6 or earlier on a case-insensitive filesystem is potentially affected. This is patched in @npmcli/arborist 2.8.2 which is included in npm v7.20.7 and above.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | npm | sid | 12.2.0+ds1-1 | fixed |
| Debian | npm | forky | 12.2.0+ds1-1 | fixed |
| Debian | npm | trixie | 9.2.0~ds1-3 | fixed |
| Debian | npm | bookworm | 9.2.0~ds1-1 | fixed |
| Alpine | nodejs | 3.11 | 12.22.6-r0 | fixed |
| Alpine | nodejs | 3.12 | 12.22.6-r0 | fixed |
| Alpine | nodejs | 3.13 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.14 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.15 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.16 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.17 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.18 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.19 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.20 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.21 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.22 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.23 | 14.17.6-r0 | fixed |
| Alpine | nodejs | 3.24 | 14.17.6-r0 | fixed |
| Ubuntu | npm | 14.04 | 1.2.18~dfsg-3 | vulnerable |
| Ubuntu | npm | 14.04 | 1.3.10~dfsg-1 | vulnerable |
| Ubuntu | npm | pro | 3.5.2-0ubuntu4 | vulnerable |
| Ubuntu | npm | pro | 3.5.2-0ubuntu4.1.18.04.1~esm1 | vulnerable |
| Ubuntu | npm | 20.04 | 5.8.0+ds6-4 | vulnerable |
| Ubuntu | npm | 20.04 | 6.14.4+ds-1ubuntu2 | vulnerable |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | npm | source | sid | 7.24.0+ds-2 | not yet assigned | Not reported | [993407] |
| Debian | npm | source | forky | 7.24.0+ds-2 | not yet assigned | Not reported | [993407] |
| Debian | npm | source | trixie | 7.24.0+ds-2 | not yet assigned | Not reported | [993407] |
| Debian | npm | source | bookworm | 7.24.0+ds-2 | not yet assigned | Not reported | [993407] |
| Alpine | nodejs | apk | 3.11 | 12.22.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.12 | 12.22.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.13 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.14 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.15 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.16 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.17 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.18 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.19 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.20 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.21 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.22 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.23 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
| Alpine | nodejs | apk | 3.24 | 14.17.6-r0 | Not reported | ALPINE-CVE-2021-39134 | Not reported |
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
[Debian 12 (Bookworm)]
- [npm]Unknown
Details (2)
9.2.0~ds1-1· all · bookwormFixed · Fixed:
7.24.0+ds-2dsa · npm · debian · bookworm; dsa · npm · debian · 12
9.2.0~ds1-1· all · bookwormFixed · Fixed:
7.24.0+ds-2dsa · npm · debian · bookworm; dsa · npm · debian · 12
[Debian 13 (Trixie)]
- [npm]Unknown
Details (2)
9.2.0~ds1-3· all · trixieFixed · Fixed:
7.24.0+ds-2dsa · npm · debian · 13
9.2.0~ds1-3· all · trixieFixed · Fixed:
7.24.0+ds-2dsa · npm · debian · 13
Observed:
References
- [https://cert-portal.siemens.com/productcert/csaf/ssa-389290.json]
- [https://ftp.suse.com/pub/projects/security/csaf/suse-su-2021_3886-1.json]
- [https://osv.dev/vulnerability/ALPINE-CVE-2021-39134]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2021-39134]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2021-39134]
- [https://security-tracker.debian.org/tracker/CVE-2021-39134]
- [https://wid.cert-bund.de/.well-known/csaf/white/2021/wid-sec-w-2022-0092.json]
[CERT-Bund public advisories] · [CISA cybersecurity advisories] · [Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [SUSE security advisories and VEX]