Skip to main content
No exploitation reportedFix available

CVE-2021-39134

No exploitation reported by the sources we read.

  • Published2021-08-31
  • WeaknessCWE-178 · CWE-61

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

`@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.

Timeline

dates in UTC
  1. 2021-08-3117:15CVE publishedNVD

Versions per branch

NVD · OSV
Oracle graalvm
BranchAffectedFixed in
20.3= 20.3.3no fix published
21.2= 21.2.0no fix published
Npmjs arboristversion to verify
BranchAffectedFixed in
2.8< 2.8.22.8.2
Siemens sinec infrastructure network services
BranchAffectedFixed in
1.0< 1.0.1.11.0.1.1

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • nodejsopenEuler:20.03-LTS-SP3all versions · fixed in 12.22.11-1.oe1
  • nodejsopenEuler:20.03-LTS-SP2all versions · fixed in 12.22.11-1.oe1
  • nodejsopenEuler:20.03-LTS-SP1all versions · fixed in 12.22.11-1.oe1
  • nodejsMageia:8all versions · fixed in 14.17.6-1.mga8
  • nodejsCleanStartall versions · fixed in 14.17.6-r0and 3 other packages
  • nodejsAlpine:v3.24all versions · fixed in 14.17.6-r0
  • nodejsAlpine:v3.23all versions · fixed in 14.17.6-r0
  • nodejsAlpine:v3.22all versions · fixed in 14.17.6-r0

28 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-39134 Red Hat Product Security

    nodejs-arborist: symlink following vulnerability

Full record on NVD

Fix

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

  • CNACVSS 3.18.2known since 2026-10-23
  • NVDCVSS 3.17.8read 2026-10-23
  • NVDCVSS 2.04.4read 2026-10-23
  • CNAweakness (CWE)CWE-61known since 2026-10-23
  • NVDweakness (CWE)CWE-178read 2026-10-23
  • FIRST EPSSEPSS score0.6 %2026-11-18
  • OSVaffected packages—
  • GitHub AdvisoriesadvisoryHIGH2021-08-31

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published
2021-08-31
Last Modified
2026-06-17
NVD status
Modified
GitHub Advisory
GHSA-2h3h-q99f-3fhc

Frequently asked questions

What is CVE-2021-39134?

`@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.

Is CVE-2021-39134 actively exploited?

Active exploitation of CVE-2021-39134 has not been confirmed. Its EPSS score was 0.6% on 2026-11-18, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-39134?

CVE-2021-39134 has a CVSS v3 base score of 7.8 (HIGH severity), with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H.

Running @npmcli/arborist? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record