cve.bz

CVE-2021-39135 Link Following

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

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; 48th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-59 Improper Link Resolution Before File Access (Link Following)
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-39135 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-39135?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-39135?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-39135 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-gmw6-94gg-2rc2npm@npmcli/arborist<2.8.22.8.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14npm7.24.0+ds-2DEBIAN-CVE-2021-39135
Ubuntu14.04:LTS, 20.04:LTS, Pro:16.04:LTS and 1 morenpmno fix listedUBUNTU-CVE-2021-39135
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
openSUSETumbleweednodejs1414.18.1-1.1openSUSE-SU-2024:11616-1
Alpinev3.11, v3.12nodejs12.22.6-r0ALPINE-CVE-2021-39135
Alpinev3.13, v3.14, v3.15 and 9 morenodejs14.17.6-r0ALPINE-CVE-2021-39135

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.

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

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
  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High

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

References

Check your stackJSON