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, an agentic coding tool used to automate coding tasks. The vulnerability exists in versions prior to 2.0.31 due to an error in how sed commands are parsed within the application. Specifically, the flawed parsing allows attackers to bypass the tool's read-only validation mechanism, enabling them to write to arbitrary files on the host system. This can lead to unauthorized modification of critical files, potentially resulting in privilege escalation, data corruption, or persistent backdoors. The vulnerability is remotely exploitable without requiring authentication or privileges but does require user interaction, such as triggering the vulnerable functionality within Claude Code. The CVSS v4.0 score of 8.7 reflects the high impact on confidentiality, integrity, and availability, given the ability to alter system files arbitrarily. Although no known exploits have been reported in the wild, the vulnerability's nature and severity necessitate prompt remediation. The patch released in version 2.0.31 corrects the sed command parsing logic, restoring proper validation and preventing arbitrary file writes. Organizations using Claude Code should prioritize upgrading to this version to mitigate risk.
Potential Impact
For European organizations, this vulnerability poses a significant risk to software development environments and any systems where Claude Code is deployed. The ability to write arbitrary files can lead to unauthorized code execution, data tampering, or disruption of development workflows. This can compromise intellectual property, introduce malware, or cause operational outages. Given the agentic nature of Claude Code, which automates coding tasks, exploitation could propagate malicious changes quickly across codebases or build systems. The lack of required privileges for exploitation increases the attack surface, especially in environments where multiple users have access to the tool. Confidentiality is at risk due to potential exposure or alteration of sensitive code or configuration files. Integrity is compromised by unauthorized file modifications, and availability may be affected if critical files are corrupted or overwritten. European organizations with stringent data protection regulations (e.g., GDPR) may face compliance issues if breaches occur due to this vulnerability.
Mitigation Recommendations
1. Immediately upgrade all instances of Claude Code to version 2.0.31 or later, where the vulnerability is patched. 2. Restrict access to Claude Code to trusted users only, minimizing the risk of exploitation via social engineering or accidental triggering. 3. Implement strict file system permissions to limit the ability of the Claude Code process to write outside designated directories, reducing the impact of potential exploitation. 4. Monitor file integrity on systems running Claude Code using tools like tripwire or OS-integrated file integrity monitoring to detect unauthorized changes promptly. 5. Educate developers and users about the risks of interacting with untrusted inputs or commands within the tool to reduce inadvertent exploitation. 6. Review and harden the CI/CD pipelines and build environments that integrate Claude Code to prevent propagation of malicious changes. 7. Employ application whitelisting and endpoint detection and response (EDR) solutions to detect anomalous behaviors related to file writes or command executions initiated by Claude Code.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland
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, an agentic coding tool used to automate coding tasks. The vulnerability exists in versions prior to 2.0.31 due to an error in how sed commands are parsed within the application. Specifically, the flawed parsing allows attackers to bypass the tool's read-only validation mechanism, enabling them to write to arbitrary files on the host system. This can lead to unauthorized modification of critical files, potentially resulting in privilege escalation, data corruption, or persistent backdoors. The vulnerability is remotely exploitable without requiring authentication or privileges but does require user interaction, such as triggering the vulnerable functionality within Claude Code. The CVSS v4.0 score of 8.7 reflects the high impact on confidentiality, integrity, and availability, given the ability to alter system files arbitrarily. Although no known exploits have been reported in the wild, the vulnerability's nature and severity necessitate prompt remediation. The patch released in version 2.0.31 corrects the sed command parsing logic, restoring proper validation and preventing arbitrary file writes. Organizations using Claude Code should prioritize upgrading to this version to mitigate risk.
Potential Impact
For European organizations, this vulnerability poses a significant risk to software development environments and any systems where Claude Code is deployed. The ability to write arbitrary files can lead to unauthorized code execution, data tampering, or disruption of development workflows. This can compromise intellectual property, introduce malware, or cause operational outages. Given the agentic nature of Claude Code, which automates coding tasks, exploitation could propagate malicious changes quickly across codebases or build systems. The lack of required privileges for exploitation increases the attack surface, especially in environments where multiple users have access to the tool. Confidentiality is at risk due to potential exposure or alteration of sensitive code or configuration files. Integrity is compromised by unauthorized file modifications, and availability may be affected if critical files are corrupted or overwritten. European organizations with stringent data protection regulations (e.g., GDPR) may face compliance issues if breaches occur due to this vulnerability.
Mitigation Recommendations
1. Immediately upgrade all instances of Claude Code to version 2.0.31 or later, where the vulnerability is patched. 2. Restrict access to Claude Code to trusted users only, minimizing the risk of exploitation via social engineering or accidental triggering. 3. Implement strict file system permissions to limit the ability of the Claude Code process to write outside designated directories, reducing the impact of potential exploitation. 4. Monitor file integrity on systems running Claude Code using tools like tripwire or OS-integrated file integrity monitoring to detect unauthorized changes promptly. 5. Educate developers and users about the risks of interacting with untrusted inputs or commands within the tool to reduce inadvertent exploitation. 6. Review and harden the CI/CD pipelines and build environments that integrate Claude Code to prevent propagation of malicious changes. 7. Employ application whitelisting and endpoint detection and response (EDR) solutions to detect anomalous behaviors related to file writes or command executions initiated by Claude Code.
Affected Countries
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/28/2025, 4:42:02 AM
Last updated: 1/8/2026, 10:28:04 AM
Views: 211
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-2026-21874: CWE-772: Missing Release of Resource after Effective Lifetime in zauberzeug nicegui
MediumCVE-2026-21873: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in zauberzeug nicegui
HighCVE-2026-21872: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in zauberzeug nicegui
MediumCVE-2026-21871: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in zauberzeug nicegui
MediumCVE-2026-21894: CWE-290: Authentication Bypass by Spoofing in n8n-io n8n
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console in Console -> Billing for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.