Vulnerabilities in pkg:npm/@turbo/codemod

PACKAGE
Advisory Identifier: GHSA-3qcw-2rhx-2726
Advisory Summary

CVE-2026-45772 is a LOW (CVSS 9.8) unexpected local code execution during vulnerability (CWE-426: Untrusted Search Path) affecting Turbo libraries in the npm ecosystem. The issue involves unexpected local code execution during yarn berry detection. Remediation is available by upgrading affected packages to version 2.9.14.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@turbo/codemod

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@turbo/codemod. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3qcw-2rhx-2726 CVE-2026-45772 LOW Turbo: Unexpected local code execution during Yarn Berry detection

CVE-2026-45772 at a Glance

CVE Identifier CVE-2026-45772
GHSA Identifier GHSA-3qcw-2rhx-2726
Severity LOW
CVSS v3.1 Base Score 9.8
CWE Classification CWE-426: Untrusted Search Path
Affected Product Turbo
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-45772

To remediate this vulnerability, upgrade all affected Turbo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

turbo fixed: 2.9.14
npm install turbo@2.9.14
@turbo/codemod fixed: 2.9.14
npm install @turbo/codemod@2.9.14
@turbo/workspaces fixed: 2.9.14
npm install @turbo/workspaces@2.9.14
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls turbo

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-45772, inspect your project dependencies using npm:

npm ls turbo

Analyze the terminal output to locate any version of Turbo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.9.14), your application is affected.

Note: The npm ls turbo command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-426: Untrusted Search Path, where the product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control. In Turbo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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 Affected Turbo Versions

3 component(s)
Fixed Versions:
2.9.14
Product / Package Ecosystem Affected Versions Fixed Version
turbo
npm
≥ 1.1.0
< 2.9.14
2.9.14
@turbo/codemod
npm
≥ 2.3.4
< 2.9.14
2.9.14
@turbo/workspaces
npm
≥ 2.3.4
< 2.9.14
2.9.14

References

Frequently Asked Questions

What is CVE-2026-45772?
CVE-2026-45772 is a security vulnerability in Turbo involving Unexpected local code execution during Yarn Berry detection under CWE-426: Untrusted Search Path.
Which Turbo versions are affected?
Affected versions include releases prior to 2.9.14 across affected packages: turbo, @turbo/codemod, @turbo/workspaces.
What version fixes CVE-2026-45772?
Upgrading to 2.9.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is turbo affected?
Yes, turbo is affected in releases prior to 2.9.14. Upgrade your dependency to 2.9.14 or later.
Is @turbo/codemod affected?
Yes, @turbo/codemod is affected in releases prior to 2.9.14. Upgrade your dependency to 2.9.14 or later.
What is the CVSS score of CVE-2026-45772?
CVE-2026-45772 has a CVSS v3.1 base score of 9.8 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-45772?
CVE-2026-45772 is classified under CWE-426: Untrusted Search Path (The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.).
How can I check npm dependencies for CVE-2026-45772?
Run the dependency tree command: 'npm ls turbo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3qcw-2rhx-2726",
  "modified" : "2026-05-19T19:46:44Z",
  "published" : "2026-05-19T19:46:44Z",
  "aliases" : [ "CVE-2026-45772" ],
  "summary" : "Turbo: Unexpected local code execution during Yarn Berry detection",
  "details" : "### Impact  \n\nTurborepo 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.\n\n### Fix  \n\nTurbo 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`.\n\n### Workarounds  \n\nIf 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "turbo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0"
      }, {
        "fixed" : "2.9.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@turbo/codemod"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.4"
      }, {
        "fixed" : "2.9.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@turbo/workspaces"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.4"
      }, {
        "fixed" : "2.9.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vercel/turborepo/security/advisories/GHSA-3qcw-2rhx-2726"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45772"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vercel/turborepo"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-426" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-19T19:46:44Z",
    "nvd_published_at" : "2026-05-15T16:16:14Z"
  }
}