Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @anthropic-ai/claude-code
  4. ›
  5. CVE-2025-59041

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

September 10, 2025 (updated November 10, 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 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!

References

  • github.com/advisories/GHSA-j4h9-wv2m-wrf7
  • github.com/anthropics/claude-code
  • github.com/anthropics/claude-code/security/advisories/GHSA-j4h9-wv2m-wrf7
  • nvd.nist.gov/vuln/detail/CVE-2025-59041
  • www.npmjs.com/package/@anthropic-ai/claude-code/v/1.0.105

Code Behaviors & Features

Detect and mitigate CVE-2025-59041 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.0.105

Fixed versions

  • 1.0.105

Solution

Upgrade to version 1.0.105 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/@anthropic-ai/claude-code/CVE-2025-59041.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:34 +0000.