CVE catalog

CVE-2021-39134

npm: CVE-2021-39134

[CVE catalog]

Severity
High · CVSS 8.1CVSS: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.

DistributionPackageReleaseVersionStatus
Debiannpmsid12.2.0+ds1-1fixed
Debiannpmforky12.2.0+ds1-1fixed
Debiannpmtrixie9.2.0~ds1-3fixed
Debiannpmbookworm9.2.0~ds1-1fixed
Alpinenodejs3.1112.22.6-r0fixed
Alpinenodejs3.1212.22.6-r0fixed
Alpinenodejs3.1314.17.6-r0fixed
Alpinenodejs3.1414.17.6-r0fixed
Alpinenodejs3.1514.17.6-r0fixed
Alpinenodejs3.1614.17.6-r0fixed
Alpinenodejs3.1714.17.6-r0fixed
Alpinenodejs3.1814.17.6-r0fixed
Alpinenodejs3.1914.17.6-r0fixed
Alpinenodejs3.2014.17.6-r0fixed
Alpinenodejs3.2114.17.6-r0fixed
Alpinenodejs3.2214.17.6-r0fixed
Alpinenodejs3.2314.17.6-r0fixed
Alpinenodejs3.2414.17.6-r0fixed
Ubuntunpm14.041.2.18~dfsg-3vulnerable
Ubuntunpm14.041.3.10~dfsg-1vulnerable
Ubuntunpmpro3.5.2-0ubuntu4vulnerable
Ubuntunpmpro3.5.2-0ubuntu4.1.18.04.1~esm1vulnerable
Ubuntunpm20.045.8.0+ds6-4vulnerable
Ubuntunpm20.046.14.4+ds-1ubuntu2vulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiannpmsourcesid7.24.0+ds-2not yet assignedNot reported[993407]
Debiannpmsourceforky7.24.0+ds-2not yet assignedNot reported[993407]
Debiannpmsourcetrixie7.24.0+ds-2not yet assignedNot reported[993407]
Debiannpmsourcebookworm7.24.0+ds-2not yet assignedNot reported[993407]
Alpinenodejsapk3.1112.22.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1212.22.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1314.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1414.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1514.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1614.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1714.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1814.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.1914.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.2014.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.2114.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.2214.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.2314.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported
Alpinenodejsapk3.2414.17.6-r0Not reportedALPINE-CVE-2021-39134Not reported

[Debian bug #993407]

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 · bookworm

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · bookworm; dsa · npm · debian · 12

    • 9.2.0~ds1-1 · all · bookworm

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · bookworm; dsa · npm · debian · 12

[Debian 13 (Trixie)]

  • [npm]Unknown
    Details (2)
    • 9.2.0~ds1-3 · all · trixie

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · 13

    • 9.2.0~ds1-3 · all · trixie

      Fixed · Fixed: 7.24.0+ds-2

      dsa · npm · debian · 13

Observed:

References