cve.bz

CVE-2021-39134 Improper Handling of Case Sensitivity

7.8 highEPSS 0.6%Fix available

High (7.8). EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in @npmcli/arborist 2.8.2.

On this page
`@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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 49th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-178 Improper Handling of Case Sensitivity
CWE-61 UNIX Symbolic Link (Symlink) Following
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-39134 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-39134?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-39134?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-39134 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
npmjs:arboristbefore 2.8.2
oracle:graalvm20.3.3
oracle:graalvm21.2.0
siemens:sinec_infrastructure_network_servicesbefore 1.0.1.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-2h3h-q99f-3fhcnpm@npmcli/arborist<2.8.22.8.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14npm7.24.0+ds-2DEBIAN-CVE-2021-39134
Ubuntu14.04:LTS, 20.04:LTS, Pro:16.04:LTS and 1 morenpmno fix listedUBUNTU-CVE-2021-39134
SUSELinux Enterprise Module for Web and Scripting 12nodejs1212.22.9-1.38.1SUSE-SU-2022:0101-1
SUSELinux Enterprise Module for Web and Scripting 12nodejs1414.18.1-6.18.2SUSE-SU-2021:3886-1
SUSELinux Enterprise Module for Web and Scripting 15 SP2, Linux Enterprise Module for Web and Scripting 15 SP3nodejs1212.22.7-4.22.1SUSE-SU-2021:3940-1
SUSELinux Enterprise Module for Web and Scripting 15 SP2, Linux Enterprise Module for Web and Scripting 15 SP3nodejs1414.18.1-15.21.2SUSE-SU-2021:3964-1
openSUSELeap 15.2nodejs1212.22.7-lp152.3.21.1openSUSE-SU-2021:1574-1
openSUSELeap 15.2nodejs1414.18.1-lp152.17.1openSUSE-SU-2021:1552-1
openSUSELeap 15.3nodejs1212.22.7-4.22.1openSUSE-SU-2021:3940-1
openSUSELeap 15.3nodejs1414.18.1-15.21.2openSUSE-SU-2021:3964-1
Alpinev3.11, v3.12nodejs12.22.6-r0ALPINE-CVE-2021-39134
Alpinev3.13, v3.14, v3.15 and 9 morenodejs14.17.6-r0ALPINE-CVE-2021-39134

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Anyone using npm v7.20.6 or earlier on a case-insensitive filesystem is potentially affected.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8nodejs:12/nodejsNot affected
Red Hat Enterprise Linux 8nodejs:14/nodejsNot affected
Red Hat Enterprise Linux 8nodejs:16/nodejsNot affected
Red Hat Enterprise Linux 9nodejsNot affected
Red Hat Software Collectionsrh-nodejs12-nodejsNot affected
Red Hat Software Collectionsrh-nodejs14-nodejsNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-39134.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-22-069-09Siemens SINEC INS2022-03-08MultipleSINEC INSnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Attack patterns (CAPEC)

  • CAPEC-27 Leveraging Race Conditions via Symbolic Links Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON