Security advisory
`@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, in part, accomplished by resolving dependency specifiers defined in `package.json` manifests for dependencies with a specific name, and nesting folders to resolve conflicting dependencies. When multiple dependencies differ only in the case of their name, Arborist's internal data structure saw them as separate items that could coexist within the same level in the `node_modules` hierarchy. However, on case-insensitive file systems (such as macOS and Windows), this is not the case. Combined with a symlink dependency such as `file:/some/path`, this allowed an attacker to create a situation in which arbitrary contents could be written to any location on the filesystem. For example, a package `pwn-a` could define a dependency in their `package.json` file such as `"foo": "file:/some/path"`. Another package, `pwn-b` could define a dependency such as `FOO: "file:foo.tgz"`. On case-insensitive file systems, if `pwn-a` was installed, and then `pwn-b` was installed afterwards, the contents of `foo.tgz` would be written to `/some/path`, and any existing contents of `/some/path` would be removed. Anyone using npm v7.20.6 or earlier on a case-insensitive filesystem is potentially aff
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-39134
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 08:49 UTC · Revision 1
Source evidence
`@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, in part, accomplished by resolving dependency specifiers defined in `package.json` manifests for dependencies with a specific name, and nesting folders to resolve conflicting dependencies. When multiple dependencies differ only in the case of their name, Arborist's internal data structure saw them as separate items that could coexist within the same level in the `node_modules` hierarchy. However, on case-insensitive file systems (such as macOS and Windows), this is not the case. Combined with a symlink dependency such as `file:/some/path`, this allowed an attacker to create a situation in which arbitrary contents could be written to any location on the filesystem. For example, a package `pwn-a` could define a dependency in their `package.json` file such as `"foo": "file:/some/path"`. Another package, `pwn-b` could define a dependency such as `FOO: "file:foo.tgz"`. On case-insensitive file systems, if `pwn-a` was installed, and then `pwn-b` was installed afterwards, the contents of `foo.tgz` would be written to `/some/path`, and any existing contents of `/some/path` would be removed. Anyone using npm v7.20.6 or earlier on a case-insensitive filesystem is potentially aff
osv:CVE-2021-39134
Complete source record
{
"id": "f3e5dc957a59e0b82f0048300c66f04054bdaa8761c724e936caa37af5b510f1",
"url": "https://osv.dev/vulnerability/CVE-2021-39134",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-39134",
"summary": "`@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, in part, accomplished by resolving dependency specifiers defined in `package.json` manifests for dependencies with a specific name, and nesting folders to resolve conflicting dependencies. When multiple dependencies differ only in the case of their name, Arborist's internal data structure saw them as separate items that could coexist within the same level in the `node_modules` hierarchy. However, on case-insensitive file systems (such as macOS and Windows), this is not the case. Combined with a symlink dependency such as `file:/some/path`, this allowed an attacker to create a situation in which arbitrary contents could be written to any location on the filesystem. For example, a package `pwn-a` could define a dependency in their `package.json` file such as `\"foo\": \"file:/some/path\"`. Another package, `pwn-b` could define a dependency such as `FOO: \"file:foo.tgz\"`. On case-insensitive file systems, if `pwn-a` was installed, and then `pwn-b` was installed afterwards, the contents of `foo.tgz` would be written to `/some/path`, and any existing contents of `/some/path` would be removed. Anyone using npm v7.20.6 or earlier on a case-insensitive filesystem is potentially aff",
"evidence": "osv:CVE-2021-39134",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-39134",
"aliases": [
"CVE-2021-39134",
"GHSA-2h3h-q99f-3fhc"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/graalvm/graalvm-ce-builds",
"type": "GIT",
"events": [
{
"introduced": "55ff3f2503007a859219b5e7f68b0f6ca95225f0"
},
{
"last_affected": "771d7a8d2b73cf72a2622ca6305dcc9e9306f296"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:oracle:graalvm:20.3.3:*:*:*:enterprise:*:*:*",
"range": [
{
"introduced": "20.3.3"
},
{
"last_affected": "20.3.3"
}
],
"source": "CPE_STRING"
},
{
"cpe": "cpe:2.3:a:oracle:graalvm:21.2.0:*:*:*:enterprise:*:*:*",
"range": [
{
"introduced": "21.2.0"
},
{
"last_affected": "21.2.0"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"20.3.3",
"21.2.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-39134.json"
}
},
{
"ranges": [
{
"repo": "https://github.com/npm/arborist",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "80f5029fc02274e5c1068891ee16ec2f42c4a534"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:npmjs:arborist:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.8.2"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v2.8.1",
"v2.8.0",
"v2.7.1",
"v2.7.0",
"v2.6.4",
"v2.6.3",
"v2.6.2",
"v2.6.1",
"v2.6.0",
"v2.5.0",
"v2.4.4",
"v2.4.3",
"v2.4.2",
"v2.4.1",
"v2.4.0",
"v2.3.0",
"v2.2.9",
"v2.2.8",
"v2.2.7",
"v2.2.6",
"v2.2.5",
"v2.2.4",
"v2.2.3",
"v2.2.2",
"v2.2.1",
"v2.2.0",
"v2.1.1",
"v2.1.0",
"v2.0.6",
"v2.0.5",
"v2.0.4",
"v2.0.3",
"v2.0.2",
"v2.0.1",
"v2.0.0",
"v1.0.14",
"v1.0.13",
"v1.0.12",
"v1.0.11",
"v1.0.10",
"v1.0.9",
"v1.0.8",
"v1.0.7",
"v1.0.6",
"v1.0.5",
"v1.0.4",
"v1.0.3",
"v1.0.2",
"v1.0.1",
"v1.0.0",
"v0.0.33",
"v0.0.32",
"v0.0.31",
"v0.0.30",
"v0.0.29",
"v0.0.28",
"v0.0.27",
"v0.0.26",
"v0.0.25",
"v0.0.24",
"v0.0.23",
"v0.0.22",
"v0.0.21",
"v0.0.20",
"v0.0.19",
"v0.0.18",
"v0.0.17",
"v0.0.16",
"v0.0.15",
"v0.0.14",
"v0.0.13",
"v0.0.12",
"v0.0.11",
"v0.0.10",
"v0.0.9",
"v0.0.8",
"v0.0.7",
"v0.0.6",
"v0.0.5",
"v0.0.4",
"v0.0.3",
"v0.0.2",
"v0.0.1",
"v0.0.0",
"v0.0.0-pre.21",
"v0.0.0-pre.20",
"v0.0.0-pre.19",
"v0.0.0-pre.18",
"v0.0.0-pre.17",
"v0.0.0-pre.15",
"v0.0.0-pre.14",
"v0.0.0-pre.13",
"v0.0.0-pre.12",
"v0.0.0-pre.11",
"v0.0.0-pre.10",
"v0.0.0-pre.9",
"v0.0.0-pre.8",
"v0.0.0-pre.7",
"v0.0.0-pre.6",
"v0.0.0-pre.5",
"v0.0.0-pre.4",
"v0.0.0-pre.3",
"v0.0.0-pre.2",
"v0.0.0-pre.1",
"v0.0.0-pre.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-39134.json"
}
}
],
"modified": "2026-10-24T10:50:25.159395800Z",
"provider": "osv",
"references": [
"https://www.npmjs.com/package/%40npmcli/arborist",
"https://github.com/npm/arborist/security/advisories/GHSA-2h3h-q99f-3fhc",
"https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf",
"https://www.oracle.com/security-alerts/cpuoct2021.html"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:*"
],
"vendor_product": "siemens:sinec_infrastructure_network_services",
"extracted_events": [
{
"range": [
{
"fixed": "1.0.1.1"
}
],
"source": "CPE_RANGE"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2021-39134",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 442139,
"published_at": "2021-08-31T17:15:08.147+00:00"
}