8.2
HIGH
CVE-2021-39135
Arborist Symbolic Link File System Write Access
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.

INFO

Published Date :

Aug. 31, 2021, 5:15 p.m.

Last Modified :

Nov. 21, 2024, 6:18 a.m.

Remotely Exploitable :

No

Impact Score :

5.8

Exploitability Score :

1.8
Affected Products

The following products are affected by CVE-2021-39135 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Npmjs npm
2 Npmjs arborist
1 Siemens sinec_infrastructure_network_services
1 Oracle graalvm
References to Advisories, Solutions, and Tools

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-39135 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-39135 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
    Added Reference https://github.com/npm/arborist/security/advisories/GHSA-gmw6-94gg-2rc2
    Added Reference https://www.npmjs.com/package/%40npmcli/arborist
    Added Reference https://www.oracle.com/security-alerts/cpuoct2021.html
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://www.npmjs.com/package/%40npmcli/arborist [No types assigned]
    Removed Reference GitHub, Inc. https://www.npmjs.com/package/@npmcli/arborist
  • Reanalysis by [email protected]

    Oct. 25, 2022

    Action Type Old Value New Value
  • Modified Analysis by [email protected]

    Apr. 25, 2022

    Action Type Old Value New Value
    Changed Reference Type https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf No Types Assigned https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf Patch, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:* *cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*
    Added CPE Configuration OR *cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:* versions up to (excluding) 1.0.1.1
  • CVE Modified by [email protected]

    Mar. 10, 2022

    Action Type Old Value New Value
    Added Reference https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf [No Types Assigned]
  • Modified Analysis by [email protected]

    Dec. 03, 2021

    Action Type Old Value New Value
    Changed Reference Type https://www.oracle.com/security-alerts/cpuoct2021.html No Types Assigned https://www.oracle.com/security-alerts/cpuoct2021.html Patch, Third Party Advisory
  • CVE Modified by [email protected]

    Oct. 20, 2021

    Action Type Old Value New Value
    Added Reference https://www.oracle.com/security-alerts/cpuoct2021.html [No Types Assigned]
  • Initial Analysis by [email protected]

    Sep. 09, 2021

    Action Type Old Value New Value
    Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism
    Added CVSS V2 NIST (AV:L/AC:M/Au:N/C:P/I:P/A:P)
    Added CVSS V3.1 NIST AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/npm/arborist/security/advisories/GHSA-gmw6-94gg-2rc2 No Types Assigned https://github.com/npm/arborist/security/advisories/GHSA-gmw6-94gg-2rc2 Third Party Advisory
    Changed Reference Type https://www.npmjs.com/package/@npmcli/arborist No Types Assigned https://www.npmjs.com/package/@npmcli/arborist Product, Third Party Advisory
    Added CWE NIST CWE-59
    Added CPE Configuration AND OR *cpe:2.3:a:npmjs:arborist:*:*:*:*:*:node.js:*:* versions up to (excluding) 2.8.2 OR cpe:2.3:a:npmjs:npm:*:*:*:*:*:*:*:* versions up to (excluding) 7.20.7
  • CVE Modified by [email protected]

    Aug. 31, 2021

    Action Type Old Value New Value
    Changed 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. `@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.
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-39135 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.09 }} 0.03%

score

0.40576

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability