CVE-2025-59041: CWE-94: Improper Control of Generation of Code ('Code Injection') in anthropics claude-code
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Ireland
CVE-2025-59041: CWE-94: Improper Control of Generation of Code ('Code Injection') in anthropics 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
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.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2025-63608: n/a
UnknownRussian Hackers Exploit Adaptix Multi-Platform Pentesting Tool in Ransomware Attacks
HighCVE-2025-10317: CWE-352 Cross-Site Request Forgery (CSRF) in OpenSolution Quick.Cart
MediumCVE-2025-39663: CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in Checkmk GmbH Checkmk
HighCVE-2025-53883: CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) in SUSE Container suse manager 5.0
CriticalActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.