{"id":"CVE-2026-55607","aliases":["CVE-2026-55607","GHSA-7835-87q9-rgvv"],"related":[],"kind":"vulnerability","state":"published","title":"Claude Code: Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.\n\nUsers on standard Claude Code auto-update have received this fix automatically. Users performing manual updates are advised to update to the latest version.\n\nThank you to hackerone.com/metnew for reporting this issue.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Claude Code es una herramienta de codificación agéntica. Desde 2.1.38 hasta 2.1.163, el manejo de worktrees de Claude Code permitía la creación de worktrees llamados ’.git’ y la navegación a worktrees fuera del contexto de la sandbox, habilitando ataques de confusión de directorio git. Al explotar la manipulación de symlinks y la ejecución de git fsmonitor durante las operaciones de worktree, un atacante podría sobrescribir archivos en el directorio de inicio del usuario (como .zshenv), lo que llevaba a la ejecución de código fuera de las restricciones de la sandbox de seatbelt. Explotar esto de forma fiable requería que el usuario clonara un repositorio malicioso que contuviera contenido de inyección de prompts y ejecutara Claude Code contra él. Esta vulnerabilidad está corregida en 2.1.163.","source":"nvd"}],"published":"2026-06-29T14:04:00.693Z","modified":"2026-10-25T21:10:00.770Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-22","CWE-59","CWE-78"],"affected":[{"ranges":[{"version":">= 2.1.38, < 2.1.163","status":"affected"}],"vendor":"anthropics","product":"claude-code","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.1.38","status":"affected","fixed":"2.1.163"}],"ecosystem":"npm","package":"@anthropic-ai/claude-code","purl":"pkg:npm/%40anthropic-ai/claude-code","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.1.38","fixed":"2.1.163"}],"vendor":"anthropic","product":"claude_code","cpe":"cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-7835-87q9-rgvv","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55607","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/anthropics/claude-code","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/anthropics/claude-code/releases/tag/v2.1.163","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-06-29T15:51:20.888Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-55607","url":"https://www.cve.org/CVERecord?id=CVE-2026-55607","licence":"CVE Terms of Use","modified":"2026-06-29T15:51:30.130Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7835-87q9-rgvv","url":"https://github.com/advisories/GHSA-7835-87q9-rgvv","licence":"CC-BY-4.0","modified":"2026-07-24T17:01:27.902Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-55607","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-55607","licence":"Public domain","modified":"2026-10-25T21:10:00.770Z"}],"updatedAt":"2026-11-25T22:59:26.616Z","epss":{"score":0.00552,"percentile":0.47524,"date":"2026-12-01T12:00:22.000Z"}}