# CVE-2021-39134: npm Arborist symlink following on case-insensitive filesystems

Source: https://junglewise.ai/threats/cve-2021-39134-npm-arborist-symlink-following-on-case-insensitive-filesystems  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-08-31. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2021-39134 · Severity: low · CVSS 3.1 · Published 2021-08-31

A vulnerability in the npm package manager's dependency management library could allow a malicious package to overwrite files on a user's computer. This occurs on systems with case-insensitive file systems, such as Windows and macOS, when a package uses specially crafted names and symbolic links. An attacker could use this to gain unauthorized access to data or execute malicious code when a user installs a compromised package.

Technologies: [npm (npm)](https://junglewise.ai/threats/technologies/npm). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-39134 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-39134 being exploited in the wild.

**How severe is CVE-2021-39134?** Low severity, with a CVSS score of 3.1, published 31 August 2021.

**Which products and versions are affected?** @npmcli/arborist (npm) SEMVER:introduced=0,fixed=2.8.2; Arborist (npm) < 2.8.2; npm (npm) < 2.8.2.

**Is there a fix for CVE-2021-39134?** Yes. @npmcli/arborist (npm): upgrade to 2.8.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-39134 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2021-39134?** Check whether you run @npmcli/arborist (npm), Arborist (npm) or npm (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @npmcli/arborist (npm): upgrade to 2.8.2 or later

  ```sh
  npm install @npmcli/arborist@2.8.2
  ```


## Technical details

A vulnerability exists in @npmcli/arborist, the library used by npm to manage node_modules, due to improper handling of case sensitivity and symbolic links (CWE-178, CWE-61). On case-insensitive filesystems (macOS/Windows), Arborist's internal data structures treated dependencies with names differing only by case as distinct entities. An attacker can exploit this by creating a package with a symlink dependency (e.g., 'foo') pointing to a sensitive system path, followed by another dependency with a case-variant name (e.g., 'FOO'). During installation, the second package's contents are extracted through the symlink, resulting in arbitrary file overwrite or creation. This is fixed in @npmcli/arborist 2.8.2 and npm 7.20.7.

## Affected products

- npm @npmcli/arborist < 2.8.2
- npm npm < 7.20.7

## Identifiers

- CVE-2021-39134
- GHSA-2h3h-q99f-3fhc

## Timeline

- 2021-08-31: disclosed
- 2021-08-31: advisory
- 2021-08-31: patched

## References

- [https://github.com/npm/arborist/security/advisories/GHSA-2h3h-q99f-3fhc](https://github.com/npm/arborist/security/advisories/GHSA-2h3h-q99f-3fhc)
- [https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf](https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf)
- [https://github.com/npm/arborist](https://github.com/npm/arborist)
- [https://www.npmjs.com/package/@npmcli/arborist](https://www.npmjs.com/package/@npmcli/arborist)
- [https://www.oracle.com/security-alerts/cpuoct2021.html](https://www.oracle.com/security-alerts/cpuoct2021.html)

## Related threats

- [npm cli local privilege escalation via uncontrolled module search path](https://junglewise.ai/threats/cve-2026-0775-npm-cli-local-privilege-escalation-via-uncontrolled-module-search)
- [npm pack root-level ignore file bypass in workspaces](https://junglewise.ai/threats/cve-2022-29244-npm-pack-root-level-ignore-file-bypass-in-workspaces)
- [npm incorrect permission assignment in mkdir](https://junglewise.ai/threats/cve-2018-7408-npm-incorrect-permission-assignment-in-mkdir)
- [npm arborist symlink following vulnerability in node_modules](https://junglewise.ai/threats/cve-2021-39135-npm-arborist-symlink-following-vulnerability-in-node-modules)
- [npm public path traversal via symlink navigation](https://junglewise.ai/threats/npm-public-path-traversal-via-symlink-navigation-dd9ade29)
