CVE-2021-39135 | 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 accomplished by extracting package contents into a project's `node_modules` folder. If the `node_modules` folder of the root project or any of its dependencies is somehow replaced with a symbolic link, it could allow Arborist to write package dependencies to any arbitrary location on the file system. Note that symbolic links contained within package artifact contents are filtered out, so another means of creating a `node_modules` symbolic link would have to be employed. 1. A `preinstall` script could replace `node_modules` with a symlink. (This is prevented by using `--ignore-scripts`.) 2. An attacker could supply the target with a git repository, instructing them to run `npm install --ignore-scripts` in the root. This may be successful, because `npm install --ignore-scripts` is typically not capable of making changes outside of the project directory, so it may be deemed safe. This is patched in @npmcli/arborist 2.8.2 which is included in npm v7.20.7 and above. For more information including workarounds please see the referenced GHSA-gmw6-94gg-2rc2.

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

Conclusion & alert: CVE-2021-39135 is rated Moderate Risk (47.2/100): CVSS High severity, with low exploitation likelihood (EPSS 0.21%). 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-39135

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 2025-11-21 1.10% 0.21% -0.89%
2 2025-11-18 0.21% 1.10% +0.89%
3 2025-08-04 0.21%

Full EPSS history (14 records total)

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

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-39135

GitHub Security Advisory for CVE-2021-39135

GHSA-gmw6-94gg-2rc2 · Severity: high · Ecosystem: npm — UNIX Symbolic Link (Symlink) Following in @npmcli/arborist

OS Trackers for CVE-2021-39135

vendor priority summary link
alpine high CVE-2021-39135: 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-39135
debian not yet assigned CVE-2021-39135 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-39135
gentoo low CVE-2021-39135: 1 GLSA(s) (202405-29), 1 atom(s) (net-libs/nodejs); latest impact low. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-39135
redhat high https://access.redhat.com/security/cve/CVE-2021-39135
suse high CVE-2021-39135 severity important: SUSE including 36 source package names (12-10.1:nodejs12-12.22.7-4.22.1, 12-10.1:npm12-12.22.7-4.22.1, …), 88 product×package rows across 11 product lines (Container bci/nodejs, SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 SP4, … (11 product lines)): Fixed 80, Known Not Affected 8. https://www.suse.com/security/cve/CVE-2021-39135/
ubuntu medium CVE-2021-39135 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-39135

Affected software / configurations for CVE-2021-39135

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-39135

cvelogic Threat Intelligence