Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @anthropic-ai/claude-code
  4. ›
  5. CVE-2026-55607

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

July 24, 2026

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.

References

  • github.com/advisories/GHSA-7835-87q9-rgvv
  • github.com/anthropics/claude-code/releases/tag/v2.1.163
  • github.com/anthropics/claude-code/security/advisories/GHSA-7835-87q9-rgvv
  • nvd.nist.gov/vuln/detail/CVE-2026-55607

Code Behaviors & Features

Detect and mitigate CVE-2026-55607 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.1.38 before 2.1.163

Fixed versions

  • 2.1.163

Solution

Upgrade to version 2.1.163 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-59: Improper Link Resolution Before File Access ('Link Following')
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Source file

npm/@anthropic-ai/claude-code/CVE-2026-55607.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 25 Jul 2026 00:17:05 +0000.