Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-59041: CWE-94: Improper Control of Generation of Code ('Code Injection') in anthropics claude-code

0
High
VulnerabilityCVE-2025-59041cvecve-2025-59041cwe-94
Published: Wed Sep 10 2025 (09/10/2025, 15:07:50 UTC)
Source: CVE Database V5
Vendor/Project: anthropics
Product: claude-code

Description

Claude Code is an agentic coding tool. At startup, Claude Code executed a command templated in with `git config user.email`. Prior to version 1.0.105, a maliciously configured user email in git could be used to trigger arbitrary code execution before a user accepted the workspace trust dialog. Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to version 1.0.105 or the latest version.

AI-Powered Analysis

AILast updated: 10/15/2025, 16:17:51 UTC

Technical Analysis

CVE-2025-59041 is a code injection vulnerability classified under CWE-94 affecting the anthropics Claude Code tool, an agentic coding assistant. The vulnerability stems from the tool executing a command at startup that incorporates the output of `git config user.email` without proper sanitization or validation. If an attacker can control the git user email configuration, they can inject arbitrary code that executes before the user has accepted the workspace trust dialog, bypassing a key security control. This means that simply opening the application with a malicious git configuration can lead to remote code execution (RCE) without requiring authentication or elevated privileges. The vulnerability affects all versions prior to 1.0.105, with a CVSS 4.0 score of 8.7, indicating high severity due to network attack vector, low attack complexity, no privileges required, and no user interaction beyond launching the app. The impact includes full compromise of the affected system's confidentiality, integrity, and availability. Although no public exploits have been reported, the ease of exploitation and the critical nature of the flaw make it a significant threat. The vulnerability was published on September 10, 2025, and users relying on manual updates are urged to upgrade immediately. The flaw highlights the risks of executing unsanitized external inputs in startup scripts, especially in developer tools that integrate with version control systems.

Potential Impact

For European organizations, the impact of CVE-2025-59041 is substantial. Organizations using Claude Code in software development, continuous integration, or automation pipelines risk full system compromise if exploited. Attackers could execute arbitrary code, leading to data theft, system manipulation, or deployment of further malware. The vulnerability bypasses workspace trust dialogs, undermining a key security boundary. This could lead to lateral movement within networks, especially in environments with interconnected developer workstations and servers. Confidentiality of proprietary code and intellectual property is at risk, as is the integrity of software builds and deployments. Availability could also be affected if attackers deploy ransomware or disrupt development environments. Given the high adoption of developer tools in European tech hubs, the threat could impact critical infrastructure sectors relying on secure software development practices. The lack of required privileges or complex user interaction increases the likelihood of successful exploitation in diverse environments.

Mitigation Recommendations

1. Immediately update Claude Code to version 1.0.105 or later to apply the official patch. 2. For environments where immediate updating is not feasible, restrict or sanitize git user email configurations to prevent injection of malicious code. 3. Implement monitoring and alerting for unusual process executions or command invocations during Claude Code startup. 4. Enforce strict workspace trust policies and consider additional manual verification steps before enabling workspace features. 5. Use endpoint detection and response (EDR) tools to detect anomalous behaviors indicative of code injection or RCE. 6. Educate developers and IT staff about the risks of malicious git configurations and the importance of verifying repository metadata. 7. Review and harden startup scripts and environment configurations to minimize reliance on external inputs without validation. 8. Employ network segmentation to limit potential lateral movement from compromised developer machines. 9. Regularly audit software supply chains and development tools for vulnerabilities and timely patching.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-09-08T16:19:26.171Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68c196ac368ecf244925d85f

Added to database: 9/10/2025, 3:18:04 PM

Last enriched: 10/15/2025, 4:17:51 PM

Last updated: 10/30/2025, 12:46:13 PM

Views: 61

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats