Advisory

GHSA-j4h9-wv2m-wrf7

Also known as: CVE-2025-59041

Summary

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

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!

Severity

High Basis: The source's own band: HIGH

Dates

Published
2025-09-10 20:29 UTC
Modified
2025-09-25 23:42 UTC

Affected packages and fixes

@anthropic-ai/claude-code

npm · All systems

Affected

  • introduced 0, fixed 1.0.105 (semver)

Fixed versions

1.0.105

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences