Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2021-39134

HIGH 8.2EPSS 42%

UNIX Symbolic Link (Symlink) Following in @npmcli/arborist

Also known as GHSA-2h3h-q99f-3fhc

Mitigation

  • Upgrade @npmcli/arborist to 2.8.2 or later.

Who should check

  • Projects that depend on npm package @npmcli/arborist (< 2.8.2)
  • Anyone running npm arborist < 2.8.2

Vulnerability facts

Affected
@npmcli/arborist < 2.8.2
Fixed in
2.8.2
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
8.2 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: None
  • User interaction: Required
  • Scope: Changed (impact reaches other components)
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: None
EPSS
0.59% chance of exploitation in 30 days (percentile 42, 2026-11-26)
CWE
CWE-61
Published
Modified

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.

Affected and fixed versions

Package / productAffectedFixedSource
npm @npmcli/arborist< 2.8.22.8.2osv
npm arborist< 2.8.2—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2021-39134. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-39134.md
Affected: @npmcli/arborist < 2.8.2
Fixed in: 2.8.2

Steps:
1. Search this machine and project for @npmcli/arborist (npm), npm arborist: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2021-39134 being exploited?

There is no confirmed exploitation: CVE-2021-39134 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.59% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2021-39134?

High: CVSS 8.2 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). A user has to take an action, such as opening a link, for the attack to work.

Which versions are affected by CVE-2021-39134?

@npmcli/arborist < 2.8.2.

Is there a fix for CVE-2021-39134?

Yes. Fixed in 2.8.2. Upgrade @npmcli/arborist to 2.8.2 or later.

How do I check if I'm affected by CVE-2021-39134?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors