Turborepo Arbitrary Code Execution Vulnerability in Yarn Configuration

Vulnerability

A vulnerability allowing arbitrary code execution has been identified in Turborepo versions 1.1.0 prior to 2.9.14. This issue arises when Turborepo is run in untrusted repositories containing malicious Yarn configuration. The vulnerability exploits the package manager detection process, which executes 'yarn --version' from the project directory. This can lead Yarn to load and execute a user-controlled 'yarnPath' from '.yarnrc.yml'. An attacker controlling the repository contents could trigger code execution when affected Turborepo commands are executed.

Impact

Exploitation of this vulnerability could lead to unexpected local code execution during Yarn Berry detection.

Remediation

Users can upgrade to Turborepo version 2.9.14 or later to address this vulnerability. If an immediate upgrade is not possible, it is recommended to avoid running Turborepo commands in untrusted repositories and to review or remove any '.yarnrc.yml' files that specify 'yarnPath' before executing Turborepo, particularly in CI or automated environments that handle external projects.

Added: May 15, 2026, 4:22 PM
Updated: May 15, 2026, 4:22 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
6.2
remediation
0.0
relevance
8.4
threat
0.0
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.