# 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.

- **Severity:** Medium 5.8 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:N/VI:L/VA:N/SC:H/SI:H/SA:H`)
- **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:** Yes
- **Published:** 10 Dec 2024
- **Updated:** 31 Dec 2025
- **Also known as:** GHSA-vm32-9rqf-rh3r, MINI-3999-f27p-cf9c

## 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 (Untrusted Search Path)

## Which versions are affected by CVE-2024-53866?

2 open source packages ship an affected version, including pnpm. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pnpm` | npm | All versions | 9.15.0 |
| `pnpm` | npm | All versions | 9.15.0 |

Products: 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](https://insights.sbomify.com/CVE-2026-50016/): pnpm: Transitive dependency alias path traversal allows project path override via symlink replacement (high 8.8)
- [CVE-2026-55698](https://insights.sbomify.com/CVE-2026-55698/): pnpm: Project env lockfile can short-circuit package-manager resolution and execute lockfile-selected pnpm bytes (high 8.8)
- [CVE-2025-69264](https://insights.sbomify.com/CVE-2025-69264/): pnpm v10+ Bypass "Dependency lifecycle scripts execution disabled by default" (high 8.8)
- [CVE-2022-26183](https://insights.sbomify.com/CVE-2022-26183/): Untrusted Search Path in PNPM (high 8.8)
- [CVE-2026-59195](https://insights.sbomify.com/CVE-2026-59195/): pnpm: Path traversal in configDependencies env lockfile allows symlink creation outside node_modules/.pnpm-config (high 8.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-53866 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-53866 exists.

Affected packages and fixed versions:
- pnpm (npm): affected all versions; fixed in 9.15.0
- pnpm (npm): affected all versions; fixed in 9.15.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-53866/ (Markdown: https://insights.sbomify.com/CVE-2024-53866/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-53866
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-53866
- OSV: https://osv.dev/vulnerability/CVE-2024-53866

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-53866/
Summaries are generated and may contain mistakes; the official description above is the record.
