Product Details
Product Name: Claude Code
Vendor: Anthropic
Product Category: AI-assisted developer CLI / automation tool
Affected Environments: Developer workstations, CI/CD runners, shared build servers
Trust Level: High (direct access to filesystem, shell, and network)
Claude Code operates with extensive local privileges to automate development workflows. Due to this design, weaknesses in input handling, path validation, or network controls can result in direct system-level impact rather than being limited to the application itself.
Vulnerability Overview
Multiple security vulnerabilities were identified in Claude Code that affect versions prior to the listed fixed releases. These vulnerabilities allow command execution, unauthorized file writes, and data exfiltration by abusing insufficient validation mechanisms.
When exploited individually, these issues pose significant risk. When chained, they may result in full host compromise, persistence, and loss of sensitive intellectual property.
Vulnerability Summary Table
| Vulnerability Name | CVE ID | CVSS Score | Severity | Exploitability | Exploitation Status |
|---|---|---|---|---|---|
| Command Injection | CVE-2026-24887 | 9.8 | Critical | High | Educational PoC reported |
| Directory Escape | CVE-2026-24053 | 8.6 | High | Medium | No public PoC |
| Domain Validation Bypass | CVE-2026-24052 | 7.4 | High | Medium | Privately demonstrated |
CVE-2026-24887 – Command Injection Leading to Arbitrary Code Execution
Description
In Claude Code versions below 2.0.72, user-controlled input was passed into shell execution contexts without sufficient sanitization. Command separators, shell expansion, and subshell execution were not consistently blocked.
As a result, arbitrary system commands could be executed with the same privileges as the Claude Code process.
Attack Vector
Exploitation was achievable through:
- Malicious prompt instructions
- Crafted file or directory names inside repositories
- Untrusted configuration parameters passed to the CLI
If Claude Code was executed in automated environments such as CI/CD pipelines, access to environment variables and credentials could be abused.
Impact
- Arbitrary command execution
- Credential theft
- Malware installation
- Lateral movement from developer endpoints
- CI/CD pipeline compromise
Proof of Concept Availability
Educational proof-of-concept payloads were demonstrated in controlled environments to validate the issue. These payloads relied on standard shell metacharacters and command substitution techniques. No weaponized exploit code has been officially released.
Detection
Indicators of Compromise
- Unexpected shell processes spawned by Claude Code
- Network connections initiated immediately after CLI execution
- Creation of temporary files unrelated to development tasks
Detection Rules
Linux – Auditd
-a always,exit -F arch=b64 -S execve -F exe=/usr/bin/claude -k claude_exec
Splunk – Process Monitoring
index=endpoint_logs process_parent="claude"
| search process_name IN ("bash","sh","zsh","curl","wget")
Elastic / KQL
process.parent.name : "claude" and
process.name : ("bash" or "sh" or "curl" or "wget")
Mitigation and Patch
Fixed Version: 2.0.72
Official Patch / Upgrade Link:
https://www.anthropic.com/security/claude-code-2.0.72
CVE-2026-24053 – Directory Escape Resulting in Arbitrary File Write
Description
Claude Code versions below 2.0.74 did not properly normalize file paths before performing write operations. Relative path traversal sequences were allowed, enabling writes outside the intended workspace.
This allowed arbitrary file overwrite within the permissions of the executing user.
Attack Vector
By supplying crafted output paths, sensitive system or user files could be overwritten. This behavior could be triggered during automated code generation or file export features.
Impact
- Overwriting shell configuration files
- Persistence through startup scripts
- SSH key modification
- Local privilege escalation preparation
Proof of Concept Availability
No public proof-of-concept has been released. The vulnerability was validated through internal testing using directory traversal techniques.
Detection
Indicators of Compromise
- File modifications outside project directories
- Changes to dotfiles following Claude Code execution
Detection Rules
Linux – File Integrity Monitoring
-w /home/ -p wa -k claude_file_write
Splunk – File Write Events
index=os_logs file_path="*/.ssh/*" OR file_path="*/.bashrc"
| search process_name="claude"
Elastic / KQL
file.path : ("/home/*/.ssh/*" or "/etc/*") and
process.name : "claude"
Mitigation and Patch
Fixed Version: 2.0.74
Official Patch / Upgrade Link:
https://www.anthropic.com/security/claude-code-2.0.74
CVE-2026-24052 – Domain Validation Bypass Leading to Data Exfiltration
Description
Claude Code versions below 1.0.111 relied on flawed domain validation logic when enforcing outbound network restrictions. Improper suffix matching allowed attacker-controlled domains to bypass allowlists.
This resulted in unauthorized transmission of sensitive data.
Attack Vector
Outbound requests were redirected using crafted domain names that visually or structurally resembled trusted domains. Unicode and nested domain patterns were successfully abused.
Impact
- Source code leakage
- Exposure of API tokens
- CI/CD secret exfiltration
- Loss of proprietary logic
Proof of Concept Availability
This issue was demonstrated in controlled testing environments. Public exploit tooling has not been released.
Detection
Indicators of Compromise
- DNS queries to newly registered domains
- Outbound HTTPS traffic following code analysis tasks
Detection Rules
DNS Logs – Suspicious Domains
index=dns_logs
| search query="*.com.*" OR query="*.net.*"
| search src_process="claude"
Firewall / Proxy Logs
index=proxy_logs application="claude"
| stats count by dest_domain
| where count < 5
Elastic / KQL
network.direction : "outbound" and
process.name : "claude" and
not network.domain : "*.trusted-domain.com"
Mitigation and Patch
Fixed Version: 1.0.111
Official Patch / Upgrade Link:
https://www.anthropic.com/security/claude-code-1.0.111
Final Takeaway
- Immediate upgrade to patched versions should be enforced
- Execution of Claude Code should be restricted to non-privileged users
- Network egress filtering should be applied
- CLI usage in CI/CD should be logged and monitored
- File system access should be constrained where possible
