CVE-2026-45772
Turbo: Unexpected local code execution during Yarn Berry detection
描述
### Impact 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. ### Fix Turbo now avoids executing project-local Yarn during package manager detection. Yarn versions and paths are inferred from metadata such as `package.json`, parsing the value of `yarnPath` in `.yarnrc.yml` rather than executing it, and `yarn.lock`, and unrecognized Yarn lockfile formats are rejected instead of falling back to executing `yarn`. ### Workarounds If you cannot upgrade immediately, do not run Turborepo commands in untrusted repositories. Review or remove `.yarnrc.yml` files that define `yarnPath` before running Turborepo, especially in CI or automated tooling that processes external projects.
如何修補 CVE-2026-45772
要修補 CVE-2026-45772,請將受影響套件升級到下列已修補版本。
- —升級至 2.9.14 或更新版本
- —升級至 2.9.14 或更新版本
- —升級至 2.9.14 或更新版本
CVE-2026-45772 正在被利用嗎?
低 — EPSS 為 0.4%,目前沒有觀察到大規模利用活動。
受影響套件(3)
- >= 2.3.4, < 2.9.14
- >= 2.3.4, < 2.9.14