Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email
High severity
GitHub Reviewed
Published
Sep 9, 2025
in
anthropics/claude-code
•
Updated Sep 25, 2025
Description
Published by the National Vulnerability Database
Sep 10, 2025
Published to the GitHub Advisory Database
Sep 10, 2025
Reviewed
Sep 10, 2025
Last updated
Sep 25, 2025
At startup, Claude Code constructed a shell command that interpolated the value of
git config user.email
from the current workspace. If an attacker controlled the repository’s Git config (e.g., via a malicious.git/config
) and setuser.email
to a crafted payload, the unescaped interpolation could trigger arbitrary command execution before the user accepted the workspace-trust dialog. The issue affects versions prior to1.0.105
. The fix in1.0.105
avoids executing commands built from untrusted configuration and properly validates/escapes inputs.@anthropic-ai/claude-code
1.0.105
or later..git/config
before launch; avoid inheriting untrusted Git configuration values.References