---
title: CVE-2021-39135
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2021-39135
---

# CVE-2021-39135

Publication date 31 August 2021

Last updated 26 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**8.2 · High**

[Score breakdown](https://ubuntu.com/security/CVE-2021-39135#impact-score)

Toggle side navigation

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

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| npm | 26.04 LTS resolute | Not affected |
| 25.10 questing | Not affected |
| 25.04 plucky | Not affected |
| 24.10 oracular | Not affected |
| 24.04 LTS noble | Not affected |
| 23.10 mantic | Ignored end of life, was needs-triage |
| 23.04 lunar | Ignored end of life, was needs-triage |
| 22.10 kinetic | Ignored end of life, was needs-triage |
| 22.04 LTS jammy | Not affected |
| 21.10 impish | Ignored end of life |
| 21.04 hirsute | Ignored end of life |
| 20.04 LTS focal | Needs evaluation |
| 18.04 LTS bionic | Needs evaluation |
| 16.04 LTS xenial | Needs evaluation |
| 14.04 LTS trusty | Needs evaluation |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

8.2 · High

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Local |
  | Attack complexity | Low |
  | Privileges required | None |
  | User interaction | Required |
  | Scope | Changed |
  | Confidentiality impact | High |
  | Integrity impact | High |
  | Availability impact | None |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 8.2 · High |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-39135)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2021-39135)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2021-39135)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2021-39135)

### Other references

* <https://github.com/npm/arborist/security/advisories/GHSA-gmw6-94gg-2rc2>
* <https://www.npmjs.com/package/@npmcli/arborist>
* <https://www.cve.org/CVERecord?id=CVE-2021-39135>
