Insecure Temporary File in /copy Command Enables Response Disclosure and Symlink-Based File Write
Medium4.4CVE-2026-46406 · Published Jun 25, 2026
The Claude Code `/copy` command wrote responses to a hardcoded, predictable path (`/tmp/claude/response.md`) without UID isolation, randomness, or symlink protection. The file was created world-readable (0644) in a world-traversable directory (0755), allowing any local user to read a privileged user's Claude response, which could contain secrets or credentials. Additionally, because the path was static and predictable, a local attacker could pre-create the directory and plant a symlink at the expected file path, causing the privileged process to follow the symlink and overwrite an attacker-chosen file with the response text. Exploiting this required a local unprivileged user on the same system and a privileged user to run the `/copy` command. Users on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version. Thank you to hackerone.com/c_h4ck_0 for reporting this issue.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| @anthropic-ai/claude-code npm | >= 2.1.59, < 2.1.128 | 2.1.128 |
Details and references
More Anthropic advisories
All Anthropic| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Jul 1 | Memory Exhaustion Denial of Service in decode_unknown_field via Unbounded Allocation | Medium6.3 | 0.8.0+1 more |
| Jul 1 | Use-After-Free in OwnedView via Unsound 'static Lifetime Promotion in Deref | Medium5.9 | 0.7.0 |
| Jun 25 | Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution | High7.7 | 2.1.163 |
| Jun 13 | Out-of-Band Data Exfiltration via Pre-Approved HuggingFace Domain in WebFetch | Medium6.0 | 2.1.163 |
| May 20 | Malicious MCP Server Configuration in PRs Enables Remote Code Execution and Secret Exfiltration | Medium5.3 | 1.0.74 |
| May 6 | SSH Host Key Verification Bypass Allows Man-in-the-Middle Attack on Remote Sessions | High7.4 | 1.4304.0 |