Critical · published November 19, 2025
⚡ A user could trigger code execution just by starting Claude Code in a risky directory! 😱 Think of it like a chef who starts cooking without checking the pantry first—if they grab a rogue ingredient, it could ruin the entire dish. In this case, running Claude Code with Yarn 3.0 in an untrusted environment is a recipe for disaster! An attacker could potentially execute malicious code lurking in the project directory before the user even accepts the startup trust dialog. This could lead to unauthorized access, data theft, or even complete compromise of the machine—definitely not a situation you'd want to find yourself in!
Think of it like a chef who starts cooking without checking the pantry first—if they grab a rogue ingredient, it could ruin the entire dish. In this case, running Claude Code with Yarn 3.0 in an untrusted environment is a recipe for disaster! This vulnerability in Claude Code allows untrusted code execution via yarn plugins before the user is prompted for trust, specifically when running on Yarn 3.0 or above and in untrusted directories.
An attacker could potentially execute malicious code lurking in the project directory before the user even accepts the startup trust dialog. This could lead to unauthorized access, data theft, or even complete compromise of the machine—definitely not a situation you'd want to find yourself in! To protect yourself, immediately update Claude Code to version 1.0.39 or higher. Be sure to always run your coding tools in trusted directories to minimize risk. Regularly review your coding environment to ensure all components are patched and secure. You've got this! Stay vigilant and secure your coding environment! 🛡️
| Product | Versions | Fixed in |
|---|---|---|
| anthropic/claude_code | < 1.0.39 | 1.0.39 |