Claude Code Unsandboxed Code Execution from Prompt Injection...#2436
Open
carlospolop wants to merge 1 commit into
Open
Claude Code Unsandboxed Code Execution from Prompt Injection...#2436carlospolop wants to merge 1 commit into
carlospolop wants to merge 1 commit into
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://github.com/Metnew/write-ups/tree/main/claude-code-worktree-sandbox-escape Content Categories: Based on the analysis, this content was categorized under "AI Security / AI Agent Abuse Local AI CLI Tools And MCP; optionally cross-reference macOS Sandbox Debug & Bypass and Git abuse techniques". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview
The post analyzes CVE-2026-55607 / GHSA-7835-87q9-rgvv, titled “Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution”, affecting Anthropic Claude Code CLI v2.1.139 on macOS Tahoe. The issue was fixed in Claude Code 2.1.163, deployed on June 4, 2026, and published on June 25, 2026. Severity is High, 🔧 Technical Details
Prompt injection driving trusted AI-agent tools: If an AI coding agent loads repository-local instructions such as
CLAUDE.md, a malicious repository can use prompt injection to make the agent invoke built-in tools that the user would not normally consider dangerous. In this case, direct Bash execution was restricted, but the attacker used Claude Code’s trustedCreateWorktree,EnterWorktree, andExitWorktreetools because those tools internally run Git commands and change filesystem state.Git worktree name collision with
.git: Applications that wrap Git worktrees must reject names that collide with Git metadata paths. Allowing a worktree named.gitcan cause Git to interpret the worktree path as a Git metadata directory. If the attacker can make that directory contain valid Git metadata, commands likegit statusmay load attacker-controlled repository co...🤖 Agent Actions
Non-final progress update:
src/AI/AI-Prompts.mdThis PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).