Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconInject malicious prompts in repository files
-
DeliveryDeveloper opens project in Claude Code
-
ExploitTrigger agentic code execution via user interaction
-
InstallSandboxed process creates symlinks to sensitive paths
-
C2Unsandboxed process writes attacker content through symlinks
-
ExecuteAchieve arbitrary file write outside sandbox
-
ImpactExecute malicious code with developer privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires prompt injection capability to manipulate Claude Code's AI agent into executing malicious sandboxed commands-specifically, the attacker must introduce malicious instructions into the context window through code comments, documentation files (README.md, docstrings), or file names that Claude Code processes. The victim developer must actively engage Claude Code's agentic features (code generation, refactoring, analysis) within a workspace containing this poisoned content. User interaction (UI:P in CVSS vector) is mandatory as the developer must invoke Claude Code operations that trigger both symlink creation and subsequent file writes. The vulnerability does NOT affect passive file viewing or installations where agentic code execution is disabled. Attack conditions (AT:P in CVSS vector) indicate deployment-specific factors: exploitation is more reliable when Claude Code has broad filesystem permissions and when projects contain files Claude Code automatically processes (configuration files, package manifests). Default Claude Code installations running with standard user privileges are exploitable. The attack is limited to local privilege escalation scope (SC:N/SI:N/SA:N)-confidentiality, integrity, and availability impacts remain within the developer's existing privilege context rather than compromising system-level resources. |
| Impact | Real-world risk is moderate despite the 7.7 CVSS score. The CVSS:4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:P) indicates network-accessible attack with low complexity but requiring specific attack conditions (AT:P) and user interaction (UI:P). The key constraint is prompt injection prerequisite: attackers must inject malicious instructions into Claude Code's context window to trigger symlink creation via sandboxed commands, then manipulate subsequent file writes. EPSS score of 0.08% (23rd percentile) reflects this practical exploitation difficulty-significantly lower than typical path traversal vulnerabilities, suggesting limited attacker interest or capability. CISA SSVC assessment confirms no active exploitation, non-automatable attack (requiring social engineering or poisoned repositories), but total technical impact (arbitrary code execution). The high CVSS reflects potential impact (VC:H/VI:H/VA:H) rather than exploitation probability. Primary risk scenarios involve developers opening untrusted projects or AI-generated code containing malicious prompts embedded in comments or documentation. With patch available since version 2.1.64 and automatic update distribution, exposure window is narrow for standard deployments. Manual update users face elevated risk until patching. |
| Exploit ScenarioDerived | An attacker creates a malicious GitHub repository containing seemingly legitimate code with embedded prompt injection payloads in code comments or markdown documentation. When a developer opens this project in Claude Code and interacts with the AI assistant, the injected prompts trigger the agent to execute sandboxed commands that create symlinks pointing from the workspace to sensitive locations like ~/.ssh/authorized_keys or system startup directories. Subsequent Claude Code operations (e.g., 'organize imports' or 'format code') write attacker-controlled content through these symlinks to the target locations, establishing persistence or executing malicious code with the developer's privileges outside the sandbox. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Apr 21, 2026
Sandbox escape in Claude Code versions prior to 2.1.64 enables arbitrary file writes outside the workspace by exploiting symlink handling between sandboxed and unsandboxed processes, potentially leading to code execution. The vulnerability requires prompt injection to trigger malicious sandboxed code execution, creating an exploitable chain where neither component can independently breach the sandbox but their interaction does. EPSS score of 0.08% (23rd percentile) suggests limited real-world exploitation likelihood, and CISA SSVC indicates no known exploitation with non-automatable attack requirements. Version 2.1.64 patches this issue, auto-deployed to standard installations.
Earlier versions of this analysis (1)
Sandbox escape in Claude Code (agentic coding tool) versions prior to 2.1.64 enables arbitrary file writes outside the workspace via symlink exploitation, potentially achieving code execution. The vulnerability chains symlink creation in the sandbox with unsandboxed file-write operations, bypassing user confirmation prompts. Exploitation requires prompt injection to inject malicious content into the Claude Code context window and trigger sandboxed code execution. No active exploitation confirmed (not in CISA KEV). CVSS 7.7 indicates high confidentiality/integrity/availability impact with network attack vector requiring user interaction. Vendor-released patch available in version 2.1.64, auto-deployed to standard update channels.
RemediationAI
Upgrade Claude Code to version 2.1.64 or later immediately. Users on standard auto-update configurations have received the patch automatically and should verify installation version through the application settings. Manual update users must download version 2.1.64+ from the official Anthropic distribution channel and restart the application. Until patching, implement compensating controls: restrict Claude Code usage to trusted, internally-developed codebases only; prohibit opening projects from untrusted sources, public repositories, or AI-generated code; disable automatic code execution features if available; monitor file system activity for unexpected writes outside project directories using filesystem audit tools (auditd on Linux, fsevents on macOS). Note that disabling symlink creation system-wide may break legitimate development workflows involving package managers and build tools. Review Claude Code workspace permissions and ensure it operates under a restricted user account with minimal filesystem privileges as defense-in-depth. Official remediation guidance: https://github.com/anthropics/claude-code/security/advisories/GHSA-vp62-r36r-9xqp.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Claude Code is an AI-powered agentic coding assistant that executes commands in a sandboxed environment to prevent unauthorized file system access. This vulnerability exploits CWE-22 (Path Traversal) through a symlink-based sandbox escape involving two process types: sandboxed processes that create symbolic links, and unsandboxed processes that write files. The sandbox incorrectly permitted sandboxed processes to create symlinks pointing outside the workspace boundary (e.g., /tmp, /etc, user home directories). When the unsandboxed Claude Code process subsequently wrote to a path within that symlink's tree, it followed the symlink without re-validating workspace boundaries, effectively writing to arbitrary filesystem locations. This represents a classic TOCTOU (Time-Of-Check-Time-Of-Use) variant where privilege separation creates an exploitable window. The CPE cpe:2.3:a:anthropics:claude-code identifies Anthropic's Claude Code as the affected product across all pre-2.1.64 versions.
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
Lifecycle Timeline
4DescriptionGitHub Advisory
Claude Code is an agentic coding tool. Prior to version 2.1.64, Claude Code's sandbox did not prevent sandboxed processes from creating symlinks pointing to locations outside the workspace. When Claude Code subsequently wrote to a path within such a symlink, its unsandboxed process followed the symlink and wrote to the target location outside the workspace without prompting the user for confirmation. This allowed a sandbox escape where neither the sandboxed command nor the unsandboxed app could independently write outside the workspace, but their combination could write to arbitrary locations, potentially leading to code execution outside the sandbox. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window to trigger sandboxed code execution via prompt injection. Users on standard Claude Code auto-update have received this fix automatically. Users performing manual updates are advised to update to version 2.1.64 or later.
Executive ViewAI
Claude Code versions prior to 2.1.64 contain a sandbox escape vulnerability enabling arbitrary file writes and potential code execution through symlink exploitation combined with prompt injection. Organizations using Claude Code for agentic development face risk of unauthorized file modification and system compromise if users are socially engineered to process malicious prompts, potentially exposing source code, credentials, or enabling lateral movement.
Vendor-released patch: Claude Code version 2.1.64. Interim mitigations pending patch deployment: restrict Claude Code usage to sandboxed, isolated environments with limited network access; disable direct file system access where feasible; implement code review workflows for all Claude Code-generated artifacts; monitor file system events for symlink creation and out-of-workspace writes.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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
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 prior to version 2.0.57 failed to properly validate MCP tool inputs, allowing malicious MCP servers to injec
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
EUVD-2026-24033
GHSA-vp62-r36r-9xqp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB