Turborepo: Unexpected local code execution during Yarn Berry detection
vercel turborepo · @turbo codemod · @turbo workspaces
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| turbo npm |
|
|
| @turbo/codemod npm |
|
|
| @turbo/workspaces npm |
vercel turborepo · @turbo codemod · @turbo workspaces
| Product | Affected | Fixed in |
|---|---|---|
| turbo npm |
|
|
| @turbo/codemod npm |
|
|
| @turbo/workspaces npm |
≥ 2.3.4 · < 2.9.14
|
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.
From the CVE record · GitHub_M
Affected Turborepo packages can execute a project-controlled Yarn path while detecting the package manager. An attacker who controls an untrusted repository can cause code execution when a user or CI system runs an affected command in that repository.
Check installations of npm turbo versions >=1.1.0 <2.9.14 and @turbo/codemod or @turbo/workspaces versions >=2.3.4 <2.9.14.