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.
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 Tumbleweed | nodejs14 | 14.18.1-1.1 | openSUSE-SU-2024:11616-1 |
| 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-gmw6-94gg-2rc2 |
Advisories 13
- 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
- openSUSE-SU-2024:11616-1 nodejs14-14.18.1-1.1 on GA media 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