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

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 May 2026
- **Updated:** 15 May 2026
- **Also known as:** GHSA-3qcw-2rhx-2726, MINI-2xrx-pqmj-qpgq

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

## 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 | Ecosystem | 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: Vercel Turborepo.

## How do I fix CVE-2026-45772?

Upgrade @turbo/codemod to 2.9.14 or later.

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

- [CVE-2026-45773](https://insights.sbomify.com/CVE-2026-45773/): Turborepo: Login callback CSRF/session fixation (medium 5.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-45772 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-45772 in the wild and no public exploit code.

Affected packages and fixed versions:
- @turbo/codemod (npm): affected from 2.3.4; fixed in 2.9.14
- @turbo/codemod (npm): affected from 2.3.4; fixed in 2.9.14
- @turbo/workspaces (npm): affected from 2.3.4; fixed in 2.9.14
- @turbo/workspaces (npm): affected from 2.3.4; fixed in 2.9.14
- turbo (npm): affected from 1.1.0; fixed in 2.9.14
- turbo (npm): affected from 1.1.0; fixed in 2.9.14

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-2026-45772/ (Markdown: https://insights.sbomify.com/CVE-2026-45772/index.md)
```

## Sources

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

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