Skip to main content

Claude Code CVE-2026-39861

| EUVDEUVD-2026-24033 HIGH
Path Traversal (CWE-22)
2026-04-21 GitHub_M GHSA-vp62-r36r-9xqp
7.7
CVSS 4.0 · GitHub Advisory
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Inject malicious prompts in repository files
  2. Delivery
    Developer opens project in Claude Code
  3. Exploit
    Trigger agentic code execution via user interaction
  4. Install
    Sandboxed process creates symlinks to sensitive paths
  5. C2
    Unsandboxed process writes attacker content through symlinks
  6. Execute
    Achieve arbitrary file write outside sandbox
  7. Impact
    Execute 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Apr 21, 2026 - 01:23 CVSS 7.7

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

claude-code < 2.1.64

Affected Packages

npm @anthropic-ai/claude-code fix: 2.1.64
euvd claude_code fix: 2.1.64

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

GitHub Advisory PRIMARY 7.7 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

4
Patch released
Apr 23, 2026 - 18:36 nvd
Patch available
Patch available
Apr 21, 2026 - 02:01 EUVD
CVSS changed
Apr 21, 2026 - 01:22 NVD
7.7 (HIGH)
CVE Published
Apr 21, 2026 - 00:56 nvd
HIGH 7.7

DescriptionGitHub 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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.1%
Top 77% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

CVE-2026-35022 CRITICAL POC
9.3 Apr 06

OS command injection in Anthropic Claude Code CLI and Agent SDK for Python allows remote, unauthenticated attackers to e

CVE-2025-59536 HIGH POC
8.7 Oct 03

Code injection in Anthropic's Claude Code CLI before version 1.0.111 allows malicious code embedded in a project directo

CVE-2026-35020 HIGH POC
8.6 Apr 06

OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python allows local attackers to execute arbi

CVE-2026-35021 HIGH POC
8.4 Apr 06

OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python enables arbitrary command execution vi

CVE-2026-25725 CRITICAL
10.0 Feb 06

Claude Code prior to version 2.1.2 has a CVSS 10.0 sandbox escape in the bubblewrap sandboxing mechanism, allowing code

CVE-2025-66032 CRITICAL POC
9.8 Dec 03

Claude Code is an agentic coding tool. Prior to 1.0.93, Due to errors in parsing shell commands related to $IFS and shor

CVE-2026-25722 CRITICAL
9.1 Feb 06

Claude Code prior to version 2.0.57 failed to properly validate MCP tool inputs, allowing malicious MCP servers to injec

CVE-2026-24887 HIGH POC
8.8 Feb 03

Claude Code versions before 2.0.72 allow authenticated attackers to execute arbitrary commands by exploiting a command p

CVE-2025-64755 HIGH
8.7 Nov 21

Claude Code is an agentic coding tool. Rated high severity (CVSS 8.7), this vulnerability is remotely exploitable, no au

CVE-2026-55607 HIGH
7.7 Jun 29

Sandbox escape and code execution in Anthropic's Claude Code CLI (versions 2.1.38 through 2.1.162) lets a malicious repo

CVE-2025-65099 HIGH
7.7 Nov 19

Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au

CVE-2025-59828 HIGH
7.7 Sep 24

Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy