CVE-2024-53866 pnpm vulnerable to no-script global cache poisoning via overrides / `ignore-scripts` evasion
Attackers can poison the global cache via workspace overrides to execute arbitrary scripts in other workspaces, bypassing ignore-scripts protections.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2024-53866?
CVE-2024-53866 is a medium-severity vulnerability in pnpm, published on 10 Dec 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
The package manager pnpm prior to version 9.15.0 seems to mishandle overrides and global cache: Overrides from one workspace leak into npm metadata saved in global cache; npm metadata from global cache affects other workspaces; and installs by default don't revalidate the data (including on first lockfile generation). This can make workspace A (even running with `ignore-scripts=true`) posion global cache and execute scripts in workspace B. Users generally expect `ignore-scripts` to be sufficient to prevent immediate code execution on install (e.g. when the tree is just repacked/bundled without executing it). Here, that expectation is broken. Global state integrity is lost via operations that one would expect to be secure, enabling subsequently running arbitrary code execution on installs. Version 9.15.0 fixes the issue. As a work-around, use separate cache and store dirs in each workspace.
Weakness: CWE-426
Which versions are affected by CVE-2024-53866?
2 open source packages ship an affected version, including pnpm. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pnpm npm | All versions | 9.15.0 |
pnpm npm | All versions | 9.15.0 |
Products include Pnpm Pnpm.
How do I fix CVE-2024-53866?
Upgrade pnpm to 9.15.0 or later.
Is CVE-2024-53866 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-53866 exists.
Other vulnerabilities in pnpm
- CVE-2026-50016 pnpm: Transitive dependency alias path traversal allows project path override via symlink replacement
- CVE-2026-55698 pnpm: Project env lockfile can short-circuit package-manager resolution and execute lockfile-selected pnpm bytes
- CVE-2025-69264 pnpm v10+ Bypass "Dependency lifecycle scripts execution disabled by default"
- CVE-2022-26183 Untrusted Search Path in PNPM
- CVE-2026-59195 pnpm: Path traversal in configDependencies env lockfile allows symlink creation outside node_modules/.pnpm-config
Sources
Also known as GHSA-vm32-9rqf-rh3r, MINI-3999-f27p-cf9c.