← All advisories
CVE-2025-59041highCode execution2025-09-10

CVE-2025-59041: Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email

At startup, Claude Code constructed a shell command that interpolated the value of git config user.email from the current workspace.

01.

What it is

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.

02.

How to check

  1. Affected: @anthropic-ai/claude-code (npm) < 1.0.105.
  2. Compare your installed version with the range above (command below).
03.

How to fix

  1. Upgrade @anthropic-ai/claude-code to 1.0.105 or later.
npm ls @anthropic-ai/claude-code -g   # or: claude --version
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

New advisories, CVEs and fixes for Lovable, Bolt, v0, Replit, Base44 and Cursor apps. No roundups of things you already read.