Skip to main content

CVE-2025-54795: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in anthropics claude-code

High
VulnerabilityCVE-2025-54795cvecve-2025-54795cwe-78
Published: Tue Aug 05 2025 (08/05/2025, 00:07:29 UTC)
Source: CVE Database V5
Vendor/Project: anthropics
Product: claude-code

Description

Claude Code is an agentic coding tool. In versions below 1.0.20, an error in command parsing makes it possible to bypass the Claude Code confirmation prompt to trigger execution of an untrusted command. Reliably exploiting this requires the ability to add untrusted content into a Claude Code context window. This is fixed in version 1.0.20.

AI-Powered Analysis

AILast updated: 08/12/2025, 01:04:24 UTC

Technical Analysis

CVE-2025-54795 is a high-severity OS command injection vulnerability (CWE-78) affecting versions of the Anthropics Claude Code agentic coding tool prior to 1.0.20. Claude Code is designed to assist with coding tasks by executing commands based on user input. The vulnerability arises from improper neutralization of special elements in the command parsing logic, which allows an attacker to bypass the built-in confirmation prompt designed to prevent execution of untrusted commands. Specifically, if an attacker can inject untrusted content into a Claude Code context window, they can craft input that triggers execution of arbitrary OS commands without user confirmation. This bypass occurs due to flawed parsing that fails to sanitize or properly handle special characters or command delimiters. Exploitation requires the attacker to have the capability to insert malicious content into the Claude Code context, which could be achieved through social engineering, supply chain compromise, or other means of influencing the input to the tool. The vulnerability does not require authentication or elevated privileges, and no user interaction beyond the injection of malicious content is needed to trigger the command execution once the input is processed. The CVSS 4.0 base score of 8.7 reflects the network attack vector, low attack complexity, no privileges required, no user interaction needed, and high impact on confidentiality, integrity, and availability. The issue was addressed in version 1.0.20 by correcting the command parsing logic to properly neutralize special elements and reinstate the confirmation prompt's effectiveness. No known exploits have been reported in the wild as of the publication date, but the potential for severe impact remains significant given the nature of arbitrary command execution.

Potential Impact

For European organizations using Anthropics Claude Code versions below 1.0.20, this vulnerability poses a serious risk. Successful exploitation could lead to unauthorized execution of arbitrary commands on systems running the tool, potentially resulting in data theft, system compromise, lateral movement within networks, or disruption of services. The high impact on confidentiality, integrity, and availability means sensitive codebases, intellectual property, and operational environments could be exposed or damaged. Since the vulnerability can be triggered remotely without authentication, attackers could leverage this flaw to gain initial footholds or escalate privileges within development environments. This is particularly concerning for organizations relying on Claude Code in critical software development pipelines or those handling sensitive data subject to GDPR and other European data protection regulations. The ability to bypass confirmation prompts increases the risk of automated or stealthy exploitation, making detection and prevention more challenging. Additionally, compromised developer tools can serve as a vector for supply chain attacks, amplifying the threat to downstream customers and partners.

Mitigation Recommendations

European organizations should immediately upgrade Anthropics Claude Code to version 1.0.20 or later to remediate this vulnerability. Until the update can be applied, organizations should implement strict input validation and sanitization controls around any user-generated content fed into Claude Code context windows to prevent injection of malicious commands. Restrict access to Claude Code environments to trusted users only and monitor logs for unusual command execution patterns or unexpected confirmation prompt bypasses. Employ network segmentation to isolate development tools from critical production systems to limit blast radius in case of compromise. Additionally, implement endpoint detection and response (EDR) solutions capable of detecting anomalous OS command executions originating from Claude Code processes. Conduct security awareness training to inform developers and users about the risks of injecting untrusted content and encourage vigilance against social engineering attempts. Finally, integrate vulnerability scanning and software composition analysis into the CI/CD pipeline to detect outdated versions of Claude Code and other dependencies proactively.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-07-29T16:50:28.394Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 689154aead5a09ad00e467f3

Added to database: 8/5/2025, 12:47:42 AM

Last enriched: 8/12/2025, 1:04:24 AM

Last updated: 9/3/2025, 10:55:49 PM

Views: 18

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

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