CVE-2026-35021
7.8Anthropic · Claude Code CLI and Claude Agent SDK
Anthropic Claude Code CLI and Claude Agent SDK are vulnerable to OS command injection via the prompt editor utility, allowing attackers to execute arbitrary commands using malicious file paths.
Executive summary
Anthropic Claude Code CLI and Claude Agent SDK contain a critical OS command injection vulnerability that allows unauthenticated attackers to execute arbitrary system commands via maliciously crafted file paths.
Vulnerability
This vulnerability is an OS command injection flaw located within the prompt editor invocation utility. It allows an attacker to achieve remote code execution on the underlying host by supplying specially crafted file paths that the utility fails to sanitize.
Business impact
Successful exploitation of this vulnerability permits an attacker to execute arbitrary commands with the privileges of the user running the CLI or SDK. This presents a high risk of total system compromise, including unauthorized data exfiltration, lateral movement within the network, and potential disruption of development workflows. Given the CVSS score of 7.8, this vulnerability is classified as High severity and requires immediate attention to prevent unauthorized system access.
Remediation
Immediate Action: Monitor official communication channels from Anthropic for the release of security patches and apply all updates to the Claude Code CLI and Claude Agent SDK immediately upon availability.
Proactive Monitoring: Review system and application logs for unusual process execution patterns or unexpected shell commands initiated by the Claude CLI or SDK utilities.
Compensating Controls: Implement strict input validation on file paths handled by development tools and restrict the execution environment of these utilities using containerization or least-privilege service accounts to limit the blast radius of a potential command injection.
Exploitation status
Public Exploit Available: No
Analyst recommendation
Given the severity of potential remote code execution, organizations utilizing the Anthropic Claude ecosystem must prioritize this issue. Security teams should identify all instances of the affected CLI and SDK within their development environments and prepare for an immediate patching cycle once the vendor releases the necessary security updates.