CVE-2025-59828
JSON

7.7high

Claude Code Vulnerable to Arbitrary Code Execution via Plugin Autoloading with Specific Yarn Versions

Severity
7.7high CVSS:4.0 by GitHub_M
Exploit likelihood
0.37% (higher than 32% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-2jjv-qf24-vfm4

Description

Claude Code is an agentic coding tool. Prior to Claude Code version 1.0.39, when using Claude Code with Yarn versions 2.0+, Yarn plugins are auto-executed when running yarn --version. This could lead to a bypass of the directory trust dialog in Claude Code, as plugins would be executed prior to the user accepting the risks of working in an untrusted directory. Users running Yarn Classic were unaffected by this issue. This issue has been fixed in version 1.0.39. Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version.

Affected

Product or packageVersionsReported by
anthropics claude-code< 1.0.39CVE List
@anthropic-ai/claude-code (npm)before 1.0.39GitHub Advisory Database
anthropic claude_codebefore 1.0.39NVD

All scores

GitHub_M7.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-829CWE-862

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Claude Code is an agentic coding tool. Prior to Claude Code version 1.0.39, when using Claude Code with Yarn versions 2.0+, Yarn plugins are auto-executed when running yarn --version. This could lead to a bypass of the directory trust dialog in Claude Code, as plugins would be executed prior to the user accepting the risks of working in an untrusted directory. Users running Yarn Classic were unaffected by this issue. This issue has been fixed in version 1.0.39. Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version.

GitHub Advisory Database

When using Claude Code with Yarn installed, Yarn config files can trigger code execution when running yarn --version. This could lead to a bypass of the directory trust dialog in Claude Code, as plugins and yarnPath could be executed prior to the user accepting the risks of working in an untrusted directory. Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version.

Thank you to Benjamin Faller, Redguard AG and Michael Hess for reporting this issue!

NVD (es)

Claude Code es una herramienta de codificación agéntica. Antes de la versión 1.0.39 de Claude Code, al usar Claude Code con versiones 2.0+ de Yarn, los plugins de Yarn se auto-ejecutan al ejecutar yarn --version. Esto podría llevar a una omisión del diálogo de confianza de directorio en Claude Code, ya que los plugins se ejecutarían antes de que el usuario aceptara los riesgos de trabajar en un directorio no confiable. Los usuarios que ejecutaban Yarn Classic no se vieron afectados por este problema. Este problema ha sido corregido en la versión 1.0.39. Los usuarios con la actualización automática estándar de Claude Code habrán recibido esta corrección automáticamente. A los usuarios que realizan actualizaciones manuales se les aconseja actualizar a la última versión.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-59828 changed 2025-09-24CVE Terms of Use
GitHub Advisory DatabaseGHSA-2jjv-qf24-vfm4 changed 2025-12-22CC-BY-4.0
NVDCVE-2025-59828 changed 2026-06-17Public domain