CVE-2021-39134 | UNIX Symbolic Link (Symlink) Following in @npmcli/arborist

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

Published: 2021-08-31 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-39134 is rated Moderate Risk (57.6/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.72%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-39134

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-03-27 1.29% 0.72% -0.57%
2 2025-11-21 1.10% 1.29% +0.19%
3 2025-11-18 1.10%

Full EPSS history (17 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-39134

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.2 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.8 5.8 [email protected]
7.8 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.8 5.9 [email protected]
4.4 2.0 MEDIUM
AV:L/AC:M/Au:N/C:P/I:P/A:P Click to expand
Access vector (AV:L)
Requires local access to the target system.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
3.4 6.4 [email protected]

Weakness enumeration for CVE-2021-39134

GitHub Security Advisory for CVE-2021-39134

GHSA-2h3h-q99f-3fhc · Severity: high · Ecosystem: npm — @npmcli/arborist vulnerable to UNIX Symbolic Link (Symlink) Following

OS Trackers for CVE-2021-39134

vendor priority summary link
alpine high CVE-2021-39134: 1 source package rows (nodejs); 9 state rows across 9 repos (3.11-main, 3.12-main, 3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 9, open 0. https://security.alpinelinux.org/vuln/CVE-2021-39134
debian not yet assigned CVE-2021-39134 not yet assigned priority: Debian including 1 source packages (npm), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 4, open 1. https://security-tracker.debian.org/tracker/CVE-2021-39134
gentoo low CVE-2021-39134: 1 GLSA(s) (202405-29), 1 atom(s) (net-libs/nodejs); latest impact low. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-39134
redhat high https://access.redhat.com/security/cve/CVE-2021-39134
suse high CVE-2021-39134 severity important: SUSE including 32 source package names (12-10.1:nodejs12-12.22.7-4.22.1, 12-10.1:npm12-12.22.7-4.22.1, …), 84 product×package rows across 10 product lines (Container bci/nodejs, SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 SP4, … (10 product lines)): Fixed 76, Known Not Affected 8. https://www.suse.com/security/cve/CVE-2021-39134/
ubuntu medium CVE-2021-39134 medium priority: Ubuntu including 1 source packages (npm), 15 status rows across 15 suites (bionic, focal, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 5, not-affected 5, needs-triage 4, released 1. https://ubuntu.com/security/CVE-2021-39134

Affected software / configurations for CVE-2021-39134

Vendor Product Version Raw CPE
npmjs arborist < 2.8.2 cpe:2.3:a:npmjs:arborist:*:*:*:*:*:node.js:*:*
oracle graalvm 20.3.3 cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*
oracle graalvm 21.2.0 cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*
siemens sinec_infrastructure_network_services < 1.0.1.1 cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:*

References for CVE-2021-39134

cvelogic Threat Intelligence