CVE-2025-64755: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in anthropics claude-code
Claude Code is an agentic coding tool. Prior to version 2.0.31, due to an error in sed command parsing, it was possible to bypass the Claude Code read-only validation and write to arbitrary files on the host system. This issue has been patched in version 2.0.31.
AI Analysis
Technical Summary
CVE-2025-64755 is an OS command injection vulnerability classified under CWE-78, affecting Anthropics' Claude Code agentic coding tool versions earlier than 2.0.31. The root cause is an error in the parsing of sed commands within the application, which leads to improper neutralization of special elements used in OS commands. This flaw enables an attacker to bypass the tool's read-only validation mechanism, allowing them to write arbitrary files on the host system. The vulnerability does not require any privileges (PR:N) but does require user interaction (UI:P), such as triggering the vulnerable functionality. The CVSS 4.0 base score is 8.7, indicating high severity, with high impact on confidentiality, integrity, and availability (VC:H/VI:H/VA:H). The scope is unchanged (SC:N), meaning the vulnerability affects only the vulnerable component. No known exploits have been reported in the wild yet, but the potential for exploitation is significant due to the ability to write arbitrary files, which could lead to code execution, privilege escalation, or persistent backdoors. The vulnerability was published on November 21, 2025, and has been patched in version 2.0.31 of Claude Code. The technical issue stems from improper input sanitization of sed commands, a common vector for OS command injection attacks, which can be leveraged to execute arbitrary shell commands on the host system.
Potential Impact
For European organizations, this vulnerability poses a substantial risk, especially those involved in software development or using Anthropics' Claude Code tool for coding automation. Successful exploitation could lead to unauthorized modification or creation of files, potentially resulting in system compromise, data breaches, or disruption of critical development workflows. The integrity and confidentiality of source code and related assets could be severely impacted, undermining trust and compliance with data protection regulations such as GDPR. Additionally, availability could be affected if attackers deploy ransomware or destructive payloads via arbitrary file writes. The lack of required privileges lowers the barrier for attackers, increasing the threat landscape. Organizations in sectors with high reliance on secure software development environments, such as finance, healthcare, and critical infrastructure, face elevated risks. The absence of known exploits in the wild provides a window for proactive mitigation but also suggests potential targeted attacks may emerge.
Mitigation Recommendations
1. Immediately upgrade Anthropics Claude Code to version 2.0.31 or later, which contains the patch for this vulnerability. 2. Restrict access to Claude Code to trusted users only, implementing strict role-based access controls to minimize exposure. 3. Monitor file system activity for unusual or unauthorized file writes, especially in directories used by Claude Code. 4. Employ application whitelisting and endpoint detection and response (EDR) solutions to detect and block suspicious command execution patterns related to sed or shell commands. 5. Educate users about the risks of interacting with untrusted inputs or scripts within Claude Code to reduce the likelihood of triggering the vulnerability. 6. Conduct regular security audits and code reviews of tools integrated into development pipelines to identify similar injection risks. 7. Implement network segmentation to isolate development environments from critical production systems, limiting lateral movement if exploitation occurs. 8. Maintain up-to-date backups of critical development assets to enable recovery in case of compromise.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy
CVE-2025-64755: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in anthropics claude-code
Description
Claude Code is an agentic coding tool. Prior to version 2.0.31, due to an error in sed command parsing, it was possible to bypass the Claude Code read-only validation and write to arbitrary files on the host system. This issue has been patched in version 2.0.31.
AI-Powered Analysis
Technical Analysis
CVE-2025-64755 is an OS command injection vulnerability classified under CWE-78, affecting Anthropics' Claude Code agentic coding tool versions earlier than 2.0.31. The root cause is an error in the parsing of sed commands within the application, which leads to improper neutralization of special elements used in OS commands. This flaw enables an attacker to bypass the tool's read-only validation mechanism, allowing them to write arbitrary files on the host system. The vulnerability does not require any privileges (PR:N) but does require user interaction (UI:P), such as triggering the vulnerable functionality. The CVSS 4.0 base score is 8.7, indicating high severity, with high impact on confidentiality, integrity, and availability (VC:H/VI:H/VA:H). The scope is unchanged (SC:N), meaning the vulnerability affects only the vulnerable component. No known exploits have been reported in the wild yet, but the potential for exploitation is significant due to the ability to write arbitrary files, which could lead to code execution, privilege escalation, or persistent backdoors. The vulnerability was published on November 21, 2025, and has been patched in version 2.0.31 of Claude Code. The technical issue stems from improper input sanitization of sed commands, a common vector for OS command injection attacks, which can be leveraged to execute arbitrary shell commands on the host system.
Potential Impact
For European organizations, this vulnerability poses a substantial risk, especially those involved in software development or using Anthropics' Claude Code tool for coding automation. Successful exploitation could lead to unauthorized modification or creation of files, potentially resulting in system compromise, data breaches, or disruption of critical development workflows. The integrity and confidentiality of source code and related assets could be severely impacted, undermining trust and compliance with data protection regulations such as GDPR. Additionally, availability could be affected if attackers deploy ransomware or destructive payloads via arbitrary file writes. The lack of required privileges lowers the barrier for attackers, increasing the threat landscape. Organizations in sectors with high reliance on secure software development environments, such as finance, healthcare, and critical infrastructure, face elevated risks. The absence of known exploits in the wild provides a window for proactive mitigation but also suggests potential targeted attacks may emerge.
Mitigation Recommendations
1. Immediately upgrade Anthropics Claude Code to version 2.0.31 or later, which contains the patch for this vulnerability. 2. Restrict access to Claude Code to trusted users only, implementing strict role-based access controls to minimize exposure. 3. Monitor file system activity for unusual or unauthorized file writes, especially in directories used by Claude Code. 4. Employ application whitelisting and endpoint detection and response (EDR) solutions to detect and block suspicious command execution patterns related to sed or shell commands. 5. Educate users about the risks of interacting with untrusted inputs or scripts within Claude Code to reduce the likelihood of triggering the vulnerability. 6. Conduct regular security audits and code reviews of tools integrated into development pipelines to identify similar injection risks. 7. Implement network segmentation to isolate development environments from critical production systems, limiting lateral movement if exploitation occurs. 8. Maintain up-to-date backups of critical development assets to enable recovery in case of compromise.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2025-11-10T22:29:34.874Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 691fc3ff70da09562fa7fca3
Added to database: 11/21/2025, 1:44:31 AM
Last enriched: 11/21/2025, 1:59:41 AM
Last updated: 11/21/2025, 3:29:27 PM
Views: 13
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-13357: CWE-1188: Initialization of a Resource with an Insecure Default in HashiCorp Tooling
HighCVE-2025-41115: Vulnerability in Grafana Grafana Enterprise
CriticalCVE-2025-13432: CWE-863: Incorrect Authorization in HashiCorp Terraform Enterprise
MediumCVE-2025-11127: CWE-639 Authorization Bypass Through User-Controlled Key in Mstoreapp Mobile App
CriticalCVE-2025-66115: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in MatrixAddons Easy Invoice
UnknownActions
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.