- "details": "### Summary\n\nIn Claude Code versions prior to **1.0.39**, when the tool is used with **Yarn 2.x or newer (Berry)**, Yarn plugins are automatically loaded and executed when running `yarn --version`. In Claude Code this sequence could execute plugin code before the user accepts the directory trust prompt for an untrusted workspace, resulting in a potential arbitrary code execution path. \n\n**Yarn Classic (v1)** is not affected. The issue is fixed in **1.0.39**.\n\n### Impact\n\nAn attacker who can influence the project directory to include or reference a malicious Yarn plugin, or who can otherwise cause plugin execution in an untrusted directory, may achieve code execution on the machine where Claude Code is invoked. The vulnerability compromises the confidentiality, integrity and availability of the vulnerable host process.\n\n### Remediation\n\nUpdate Claude Code to **1.0.39** or later. Users on auto-update channels receive the fix automatically; manual installations should upgrade explicitly. As defense in depth, avoid running Yarn in untrusted directories and prefer Yarn Classic when plugin functionality is not required.\n\n### Background\n\nYarn 2+ supports a plugin architecture in which plugins are loaded at runtime and can inject behavior into Yarn commands; this capability underpins the observed auto-execution on `yarn --version`.\n\n---\n\n> Thank you to https://hackerone.com/michel_ for reporting this issue!",
0 commit comments