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, 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 affected. This is patched in @npmcli/arborist 2.8.2 which is included in npm v7.20.7 and above.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| npm | arborist | < 2.8.2 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | npm | 7.24.0+ds-2 | — |
| Debian 13 | npm | 7.24.0+ds-2 | — |
| Debian 12 | npm | 7.24.0+ds-2 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | npm | No fix yet | — |
| Ubuntu 14.04 LTS | npm | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 18.04 LTS | npm | No fix yet | — |
| Ubuntu Pro 16.04 LTS | npm | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | nodejs12 | 12.22.7-4.22.1 | SUSE-SU-2021:3940-1 |
| SLES 15 SP3 | nodejs14 | 14.18.1-15.21.2 | SUSE-SU-2021:3964-1 |
| SLES 15 SP2 | nodejs12 | 12.22.7-4.22.1 | SUSE-SU-2021:3940-1 |
| SLES 15 SP2 | nodejs14 | 14.18.1-15.21.2 | SUSE-SU-2021:3964-1 |
| SLES 12 | nodejs12 | 12.22.9-1.38.1 | SUSE-SU-2022:0101-1 |
| SLES 12 | nodejs14 | 14.18.1-6.18.2 | SUSE-SU-2021:3886-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.3 | nodejs12 | 12.22.7-4.22.1 | openSUSE-SU-2021:3940-1 |
| openSUSE Leap 15.3 | nodejs14 | 14.18.1-15.21.2 | openSUSE-SU-2021:3964-1 |
| openSUSE Leap 15.2 | nodejs12 | 12.22.7-lp152.3.21.1 | openSUSE-SU-2021:1574-1 |
| openSUSE Leap 15.2 | nodejs14 | 14.18.1-lp152.17.1 | openSUSE-SU-2021:1552-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | nodejs | 14.17.6-r0 | — |
| Alpine v3.23 | nodejs | 14.17.6-r0 | — |
| Alpine v3.22 | nodejs | 14.17.6-r0 | — |
| Alpine v3.21 | nodejs | 14.17.6-r0 | — |
| Alpine v3.20 | nodejs | 14.17.6-r0 | — |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | nodejs | 14.17.6-r0 | — |
| Alpine v3.18 | nodejs | 14.17.6-r0 | — |
| Alpine v3.17 | nodejs | 14.17.6-r0 | — |
| Alpine v3.16 | nodejs | 14.17.6-r0 | — |
| Alpine v3.15 | nodejs | 14.17.6-r0 | — |
| Alpine v3.14 | nodejs | 14.17.6-r0 | — |
| Alpine v3.13 | nodejs | 14.17.6-r0 | — |
| Alpine v3.12 | nodejs | 12.22.6-r0 | — |
| Alpine v3.11 | nodejs | 12.22.6-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | @npmcli/arborist | < 2.8.2 | 2.8.2 | GHSA-2h3h-q99f-3fhc |
Advisories 12
- openSUSE-SU-2021:1574-1 Security update for nodejs12 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:3940-1 Security update for nodejs12 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:3964-1 Security update for nodejs14 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2021:1552-1 Security update for nodejs14 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2021:3886-1 Security update for nodejs14 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2022:0101-1 Security update for nodejs12 SUSE / openSUSE Security Updates · Feb 4, 2026
- FSA-202302 Festo: Several vulnerabilities in FactoryViews CERT@VDE · Feb 2, 2026
- openSUSE-SU-2021:3940-1 Security update for nodejs12 SUSE / openSUSE Security Updates · May 7, 2025
- openSUSE-SU-2021:3964-1 Security update for nodejs14 SUSE / openSUSE Security Updates · May 7, 2025
- ICSA-22-069-09 Siemens SINEC INS CISA ICS & IT advisories · May 6, 2025
- WID-SEC-2022-0092 Node.js: Mehrere Schwachstellen ermöglichen Manipulation von Dateien BSI CERT-Bund (WID) · May 9, 2024
- SSA-389290 SSA-389290: Third-Party Component Vulnerabilities in SINEC INS Siemens ProductCERT · Mar 8, 2022