INCIDENT MAP

Browse / Tool and Agent Misuse / CVE-2025-59041

Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email

CVE-2025-59041 · 2025-09-10 high

Class
Tool and Agent Misuse (filed by a model that read the advisory)
Technique
Code and command execution
Affected
@anthropic-ai/claude-code (npm)
Gets past
Approval or confirmation prompt
CVSS
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS
0.5% chance of exploitation in 30 days

How it works, in short

A malicious git user.email value in a repository's config is interpolated into a startup shell command, running it before the user accepts the workspace trust dialog. (Our summary, written by a model. The source text is below.)

Details

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 set user.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 to 1.0.105. The fix in 1.0.105 avoids executing commands built from untrusted configuration and properly validates/escapes inputs.

> Thank you to the NVIDIA AI Red Team for reporting this issue!

References

Source: GitHub Advisory Database, used under CC BY 4.0.