@anthropic-ai/claude-code has an Insecure Temporary File in /copy Command that Enables Response Disclosure and Symlink-Based File Write
CVE-2026-46406 · GHSA-4vp2-6q8c-pvq2 · published 2026-06-25
- Severity
- Medium
- CVSS score
- 4.4
- Chance of exploitation (EPSS)
- 0.15%
- Fixed in
- 2.1.128
- Exploitation No known exploitation
- Automatable No
- Technical impact Partial
- CISA SSVC
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.
Upgrade @anthropic-ai/claude-code to 2.1.128 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| @anthropic-ai/claude-code | npm | >= 2.1.59, < 2.1.128 | 2.1.128 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- CriticalMCP Toolbox HTTP tool path parameters allow traversal to unintended endpointsgithub.com/googleapis/mcp-toolbox
- HighClaude Code: TOCTOU Race in Edit Tool Allows File Writes Outside the Workspace@anthropic-ai/claude-code
- HighClaude Code: Plugin Hash Pin Bypass Allows Bypass of Hash Pinning@anthropic-ai/claude-code
- HighClaude Code: Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution@anthropic-ai/claude-code
- HighClaude Code: Trust Dialog Bypass via Git Worktree Spoofing Allows Arbitrary Code Execution@anthropic-ai/claude-code
- HighClaude Code: Sandbox Escape via Symlink Following Allows Arbitrary File Write Outside Workspace@anthropic-ai/claude-code
- HighClaude Code has a Workspace Trust Dialog Bypass via Repo-Controlled Settings File@anthropic-ai/claude-code
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.