Skip to main content

Claude Code EUVDEUVD-2026-40117

| CVE-2026-55607 HIGH
Path Traversal (CWE-22)
2026-06-29 GitHub_M GHSA-7835-87q9-rgvv
7.7
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Victim clones malicious repository
  2. Delivery
    Run Claude Code against repo
  3. Exploit
    Worktree named .git confuses git directory
  4. Execution
    fsmonitor executes with symlink redirection
  5. Persist
    Overwrite ~/.zshenv in home directory
  6. Impact
    Shell sources file, code runs outside sandbox

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 the victim to clone a malicious repository containing prompt-injection content and then run Claude Code (versions 2.1.38-2.1.162) against it; the repo must carry a git worktree named ".git" and rely on symlink manipulation plus git fsmonitor execution during worktree operations to redirect writes into the home directory (for example overwriting .zshenv). The impact is realized specifically against the macOS seatbelt sandbox model. Limiting factors: the attack is not zero-click - it needs user interaction (cloning and opening the hostile repo, matching CVSS UI:P and the AT:P attack requirement), depends on a non-default malicious repository structure, and depends on shell-startup behavior (a shell that sources the overwritten file) to gain execution; it is unauthenticated (PR:N) from the attacker's side but cannot succeed against trusted or benign repositories.

Impact

The supplied CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H, base 7.7) signals network delivery with no authentication but with a present attack requirement (AT:P) and passive user interaction, which aligns with the description: the attacker needs no credentials, but the victim must clone a malicious repo and run Claude Code against it, and a prompt-injection/setup condition must hold. No EPSS score, SSVC decision, or KEV listing was provided, and no public proof-of-concept was identified, so there is no evidence of active or automatable exploitation today. Note a tension between the input AC:L and the technical reality: reliable exploitation chains symlink manipulation with fsmonitor timing, which is non-trivial, so practical attack complexity is arguably higher than AC:L suggests - verify against the vendor advisory. Overall this is a credible, high-impact developer-supply-chain risk (full sandbox escape to RCE) gated behind user interaction and a malicious-repo precondition, making it a patch-soon rather than drop-everything emergency in the absence of in-the-wild exploitation data.

Exploit ScenarioDerived

An attacker publishes an attractive open-source repository seeded with prompt-injection content and a crafted git worktree named ".git" plus malicious symlinks and fsmonitor configuration. A developer clones it and runs Claude Code against the project; during worktree operations git executes the attacker-controlled fsmonitor program and writes are redirected via symlinks to overwrite ~/.zshenv. The next shell launch sources the poisoned file and runs the attacker's code on the host, outside the seatbelt sandbox. No public PoC was identified at time of analysis.

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

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

Alert me

AnalysisAIv1 – Jun 29, 2026

Sandbox escape and code execution in Anthropic's Claude Code CLI (versions 2.1.38 through 2.1.162) lets a malicious repository break out of the macOS seatbelt sandbox by abusing git worktree handling. By creating a worktree named ".git" and combining symlink manipulation with git fsmonitor execution, an attacker can overwrite files in the user's home directory such as .zshenv to achieve code execution outside the sandbox. There is no public exploit identified at time of analysis and the issue is not in CISA KEV, but exploitation is realistic since it only requires a user to clone and open a booby-trapped repo; it is fixed in 2.1.163.

RemediationAI

Vendor-released patch: 2.1.163 - upgrade Claude Code to 2.1.163 or later, which fixes the worktree handling, per advisory GHSA-7835-87q9-rgvv (https://github.com/anthropics/claude-code/security/advisories/GHSA-7835-87q9-rgvv). Until patched, the most effective compensating control is to avoid cloning or running Claude Code against untrusted or unfamiliar repositories, since exploitation requires opening a malicious repo; treat third-party repos as hostile and inspect them (especially for unusual worktrees, symlinks, and git core.fsmonitor configuration or hooks) before pointing the tool at them. Where feasible, run Claude Code on disposable or strongly isolated machines or containers so a sandbox escape does not reach a trusted home directory, accepting the trade-off of reduced convenience and added setup overhead. Do not rely on the seatbelt sandbox alone as a trust boundary for untrusted code on vulnerable versions.

Affected VersionsENISA

claude-code 2.1.38, < 2.1.163

Affected Packages

npm @anthropic-ai/claude-code fix: 2.1.163
euvd claude_code_2_1_38 fix: 2.1.163

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 agentic command-line coding assistant that runs untrusted repository content inside a macOS seatbelt sandbox to contain side effects. The flaw is a CWE-22 path traversal / git directory confusion in the tool's git worktree feature: git resolves the special ".git" path to locate repository metadata and hooks, so allowing a worktree named ".git" and permitting navigation to worktrees outside the sandboxed context lets an attacker control which directory git treats as the repo. The exploit weaponizes git's fsmonitor mechanism (a configurable program git runs automatically during worktree operations) together with symlinks, so file writes intended for the worktree are redirected into the user's home directory. Shells source startup files such as .zshenv on launch, turning an arbitrary file overwrite into host code execution outside the seatbelt confinement. Per the supplied CPE (cpe:2.3:a:anthropics:claude-code), the affected component is the Claude Code application itself rather than git.

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

Vendor (GitHub_M) 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
vuln.today AI 8.3 HIGH

Malicious repo is network-delivered (AV:N) but needs symlink/fsmonitor chaining (AC:H) and the victim to clone and run the tool (UI:R); the sandbox escape changes scope (S:C) with full host code execution (C/I/A:H).

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N
Red Hat 7.1 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

1
Patch available
Jun 29, 2026 - 16:01 EUVD

DescriptionCVE.org

Claude Code is an agentic coding tool. From 2.1.38 until 2.1.163, Claude Code's worktree handling allowed creation of worktrees named ".git" and navigation to worktrees outside the sandbox context, enabling git directory confusion attacks. By exploiting symlink manipulation and git fsmonitor execution during worktree operations, an attacker could overwrite files in the user's home directory (such as .zshenv), leading to code execution outside of seatbelt sandbox restrictions. Reliably exploiting this required the user to clone a malicious repository containing prompt injection content and run Claude Code against it. This vulnerability is fixed in 2.1.163.

Executive ViewAI

Why It Matters

Claude Code CLI for macOS (versions 2.1.38-2.1.162) contains a sandbox escape vulnerability allowing code execution in the user's home directory when users clone malicious repositories. While no public exploit has been identified, successful attacks could bypass macOS sandbox protections and compromise system configurations, environment variables, and credentials stored in shell initialization files.

Business Impact: High
Compensating Controls

Apply vendor patch: Claude Code CLI 2.1.163. Until patched, restrict Claude Code CLI deployment on sensitive development systems and establish repository source vetting procedures before developers clone external projects.

Threat Intelligence Overview

EPSS Score
0.7%
Top 52% exploitable
Prevalence
Medium
popular developer coding CLI, widely used but not enterprise-ubiquitous infrastructure
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor 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 No
EPSS 0.7%
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

39
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: 0
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-39861 HIGH POC
7.7 Apr 21

Sandbox escape in Claude Code versions prior to 2.1.64 enables arbitrary file writes outside the workspace by exploiting

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-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

Vendor StatusVendor

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