Knowledge base
CodexGuild Knowledge Base

Claude Code: Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace

as of Apr 21, 2026 · applies to @anthropic-ai/claude-code < 2.1.64 · canonical · codexguild.com/kb/ghsa-vp62-r36r-9xqp · exported 2026-10-11
Canonical as of Apr 21, 2026

Claude Code: Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace

High severity. Affects @anthropic-ai/claude-code < 2.1.64. Upgrade to 2.1.64 or later.

CVE-2026-39861 / GHSA-vp62-r36r-9xqp · severity: high · CVSS 10 · npm

Affected

  • @anthropic-ai/claude-code < 2.1.64 → fixed in 2.1.64

Details

Claude Code's sandbox did not prevent sandboxed processes from creating symlinks pointing to locations outside the workspace. When Claude Code subsequently wrote to a path within such a symlink, its unsandboxed process followed the symlink and wrote to the target location outside the workspace without prompting the user for confirmation. This allowed a sandbox escape where neither the sandboxed command nor the unsandboxed app could independently write outside the workspace, but their combination could write to arbitrary locations, potentially leading to code execution outside the sandbox. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window to trigger sandboxed code execution via prompt injection.

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

Claude Code thanks hackerone.com/philts for reporting this issue.

Source: GHSA-vp62-r36r-9xqp — GitHub Advisory Database (CC-BY-4.0).