Claude Code
CVE-2026-25722
CRITICAL
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInject untrusted content into Claude Code context
-
ExploitExecute cd command to navigate to .claude directory
-
ExecutionBypass write protection validation
-
ImpactModify or create protected files without confirmation
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Claude Code version prior to 2.0.57 with untrusted user-supplied content in context window. Requires ability to provide input to Claude Code that triggers command execution, such as through chat interface or API accepting user prompts. |
| Impact | CVSS 9.1 — Claude Code runs on developer workstations with access to source code and credentials. MCP server compromise could cascade to full development environment takeover. |
| Exploit ScenarioDerived | A developer connects Claude Code to a malicious MCP server that returns crafted tool responses containing injected commands, which execute on the developer's workstation. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 12, 2026
Claude Code prior to version 2.0.57 failed to properly validate MCP tool inputs, allowing malicious MCP servers to inject commands through tool responses.
Earlier versions of this analysis (1)
Input validation failure in Claude Code enables command injection via malicious MCP servers.
RemediationAI
Update Claude Code to 2.0.57+. Only connect to trusted MCP servers.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Claude Code < 2.0.57 has a CWE-20 improper input validation vulnerability where MCP tool inputs were not properly validated, allowing malicious MCP servers to inject commands through crafted tool responses.
Know when Claude Code gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
2DescriptionGitHub Advisory
Claude Code is an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.
Executive ViewAI
Claude Code versions prior to 2.0.57 contain a critical vulnerability allowing unauthorized write operations to protected system folders through improper directory validation. Organizations using Claude Code for development or automation face risk of system compromise, data exfiltration, and operational disruption until patching is available.
Disable Claude Code write permissions to protected directories via OS-level access controls; implement host-based file integrity monitoring (HIDS) to alert on unauthorized writes to critical folders; restrict Claude Code process privileges using least-privilege principles; isolate Claude Code instances in containerized environments with limited filesystem access; monitor and log all Claude Code file operations; consider disabling agentic features until patch is released.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Affected Products (CPE)GitHub Advisory
More in Claude Code
View allOS command injection in Anthropic Claude Code CLI and Agent SDK for Python allows remote, unauthenticated attackers to e
Code injection in Anthropic's Claude Code CLI before version 1.0.111 allows malicious code embedded in a project directo
OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python allows local attackers to execute arbi
OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python enables arbitrary command execution vi
Sandbox escape in Claude Code versions prior to 2.1.64 enables arbitrary file writes outside the workspace by exploiting
Claude Code prior to version 2.1.2 has a CVSS 10.0 sandbox escape in the bubblewrap sandboxing mechanism, allowing code
Claude Code is an agentic coding tool. Prior to 1.0.93, Due to errors in parsing shell commands related to $IFS and shor
Claude Code versions before 2.0.72 allow authenticated attackers to execute arbitrary commands by exploiting a command p
Claude Code is an agentic coding tool. Rated high severity (CVSS 8.7), this vulnerability is remotely exploitable, no au
Sandbox escape and code execution in Anthropic's Claude Code CLI (versions 2.1.38 through 2.1.162) lets a malicious repo
Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au
Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au
GHSA-66q4-vfjg-2qhh
NVD
CVE.org
EPSS
Exploit-DB