CVE-2026-45772 Turborepo: Unexpected local code execution during Yarn Berry detection
Attackers can execute arbitrary code by crafting malicious Yarn configurations in repositories processed by vulnerable Turborepo commands.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-45772?
CVE-2026-45772 is a code injection vulnerability in @turbo codemod, published on 15 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Turborepo is a high-performance build system for JavaScript and TypeScript codebases. From 1.1.0 to before 2.9.14, Turborepo can be vulnerable to arbitrary code execution when run in untrusted repositories that contain malicious Yarn configuration. In affected versions, package manager detection executed yarn --version from the project directory, which could cause Yarn to load and execute a project-controlled yarnPath from .yarnrc.yml. An attacker who controls repository contents could cause code execution when a user or CI system runs affected turbo, @turbo/codemod, or @turbo/workspace conversion commands. This vulnerability is fixed in 2.9.14.
Weakness: CWE-426
Which versions are affected by CVE-2026-45772?
6 open source packages ship an affected version, including @turbo/codemod, @turbo/workspaces and turbo. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
@turbo/codemod npm | From 2.3.4 | 2.9.14 |
@turbo/codemod npm | From 2.3.4 | 2.9.14 |
@turbo/workspaces npm | From 2.3.4 | 2.9.14 |
@turbo/workspaces npm | From 2.3.4 | 2.9.14 |
turbo npm | From 1.1.0 | 2.9.14 |
turbo npm | From 1.1.0 | 2.9.14 |
Products include Vercel Turborepo.
How do I fix CVE-2026-45772?
Upgrade @turbo/codemod to 2.9.14 or later.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-45772 being exploited?
There is no known exploitation of CVE-2026-45772 in the wild and no public exploit code.
Other vulnerabilities in @turbo codemod
Sources
Also known as GHSA-3qcw-2rhx-2726, MINI-2xrx-pqmj-qpgq.