Skip to main content
No exploitation reportedFix available

CVE-2021-39135

No exploitation reported by the sources we read.

  • Published2021-08-31
  • WeaknessCWE-59 · 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 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.

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

29 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-39135 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-59read 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-gmw6-94gg-2rc2

Frequently asked questions

What is CVE-2021-39135?

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

Is CVE-2021-39135 actively exploited?

Active exploitation of CVE-2021-39135 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-39135?

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