Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace
High7.7CVE-2026-39861 · Published Apr 20, 2026
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. Thank you to hackerone.com/philts for reporting this issue.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| @anthropic-ai/claude-code npm | < 2.1.64 | 2.1.64 |
Details and references
More Anthropic advisories
All Anthropic| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| May 6 | SSH Host Key Verification Bypass Allows Man-in-the-Middle Attack on Remote Sessions | High7.4 | 1.4304.0 |
| May 6 | Local Privilege Escalation via Directory Junction in CoworkVMService | High8.5 | 1.3834.0 |
| Apr 24 | Claude SDK for TypeScript has Insecure Default File Permissions in Local Filesystem Memory Tool | Medium4.8 | 0.91.1 |
| Apr 24 | Trust Dialog Bypass via Git Worktree Spoofing Allows Arbitrary Code Execution | High7.7 | 2.1.84 |
| Apr 17 | Insecure System-Wide Configuration Loading Enables Local Privilege Escalation on Windows | Medium5.4 | 2.1.75 |
| Mar 31 | Memory Tool Path Validation Race Condition Allows Sandbox Escape | Medium5.8 | 0.87.0 |