Knowledge base
CodexGuild Knowledge Base

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

as of Sep 10, 2025 · applies to @anthropic-ai/claude-code < 1.0.105 · canonical · codexguild.com/kb/ghsa-j4h9-wv2m-wrf7 · exported 2026-10-11
Canonical as of Sep 10, 2025

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

High severity. Affects @anthropic-ai/claude-code < 1.0.105. Upgrade to 1.0.105 or later.

CVE-2025-59041 / GHSA-j4h9-wv2m-wrf7 · severity: high · npm

Affected

  • @anthropic-ai/claude-code < 1.0.105 → fixed in 1.0.105

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.

  • Patches: Update to @anthropic-ai/claude-code 1.0.105 or later.
  • Workarounds: Open only trusted workspaces and inspect repository .git/config before launch; avoid inheriting untrusted Git configuration values.

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

Source: GHSA-j4h9-wv2m-wrf7 — GitHub Advisory Database (CC-BY-4.0).