CVE-2026-55607: Claude Code: Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution

Published Jun 29, 2026
·
Updated

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.

Other sources

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.

Users on standard Claude Code auto-update have received this fix automatically. Users performing manual updates are advised to update to the latest version.

Thank you to hackerone.com/metnew for reporting this issue.

GitHub

Affected Software

3 affected componentsFixes available
Claude Code>2.1.38<=2.1.163
Anthropic Claude Code Node.js>=2.1.38<2.1.163
npm/@anthropic-ai/claude-code>=2.1.38<2.1.163
2.1.163

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@anthropic-ai/claude-code to a version that resolves this vulnerability.

    Fixed in 2.1.163
  2. Upgrade

    Upgrade Claude Code to a version that resolves this vulnerability.

    Fixed in 2.1.163

Event History

Jun 29, 2026
CVE Published
via MITRE·02:04 PM
Data Sourced
via MITRE·02:04 PM
DescriptionWeakness
Data Sourced
via NVD·03:16 PM
DescriptionSeverityWeaknessAffected Software
Jul 24, 2026
Advisory Published
via GitHub·04:54 PM
Data Sourced
via GitHub·04:54 PM
DescriptionWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-55607?

CVE-2026-55607 has a high severity rating of 7.7 according to the CVSS scoring system.

2

How do I fix CVE-2026-55607?

To address CVE-2026-55607, update Claude Code to version 2.1.164 or later to mitigate the vulnerability.

3

What is the impact of CVE-2026-55607?

CVE-2026-55607 allows an attacker to execute unsandboxed code due to path confusion in the Git worktree handling.

4

Which versions of Claude Code are affected by CVE-2026-55607?

CVE-2026-55607 affects Claude Code versions from 2.1.38 to 2.1.163.

5

Can CVE-2026-55607 lead to data exposure?

Yes, exploiting CVE-2026-55607 can enable attackers to access sensitive data by executing code outside of the intended sandbox.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203