{"id":"CVE-2026-46406","published":"2026-06-29T14:03:14Z","modified":"2026-06-29T15:26:11Z","title":"Claude Code: Insecure Temporary File in /copy Command Enables Response Disclosure and Symlink-Based File Write","vendor":"anthropics","product":"claude-code","tier":"tail","description":{"text":"Claude Code is an agentic coding tool.  From 2.1.59 until 2.1.128, 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. This vulnerability is fixed in 2.1.128.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.4,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00154,"percentile":0.04562,"provenance":"source"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-377","name":"Insecure Temporary File"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-4vp2-6q8c-pvq2","tags":["x_refsource_CONFIRM"]}],"priority":{"score":4.0,"factors":[{"name":"EPSS percentile","points":0.91},{"name":"CVSS severity","points":3.08}]},"vendorSlug":"anthropics","affectedVersions":[{"vendor":"anthropics","product":"claude-code","versions":[">= 2.1.59, < 2.1.128"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-29T15:25:46.123210Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@anthropic-ai/claude-code","vulnerableRanges":[">=2.1.59, <2.1.128"],"patched":["2.1.128"],"from":["GHSA-4vp2-6q8c-pvq2"],"provenance":"source"}],"summary":{"text":"The Claude Code agentic coding tool's /copy command, in versions from 2.1.59 up to 2.1.128, writes responses to a hardcoded, predictable temporary path without isolation, randomness, or symlink protection. A local user with low privileges can read another user's copied response, which may contain secrets, or pre-plant a symlink so the privileged process overwrites an attacker-chosen file; exploitation requires local access to the same system and a privileged user running /copy, with user interaction involved.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:12Z"},"euvd":{"id":"EUVD-2026-40116","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-39861","published":"2026-04-21","fixed":"2.1.64","kev":false},{"cve":"CVE-2026-35603","published":"2026-04-17","fixed":"2.1.75","kev":false},{"cve":"CVE-2026-40068","published":"2026-05-05","fixed":"2.1.84","kev":false,"link":{"from":"CVE-2026-40068","to":"CVE-2026-46406","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@anthropic-ai/claude-code","fromFixed":"2.1.84","toFixed":"2.1.128","daysApart":55}]}},{"cve":"CVE-2026-46406","published":"2026-06-29","fixed":"2.1.128","kev":false},{"cve":"CVE-2026-54316","published":"2026-06-23","fixed":"2.1.163","kev":false,"link":{"from":"CVE-2026-46406","to":"CVE-2026-54316","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@anthropic-ai/claude-code","fromFixed":"2.1.128","toFixed":"2.1.163","daysApart":-6}]}},{"cve":"CVE-2026-55607","published":"2026-06-29","fixed":"2.1.163","kev":false,"link":{"from":"CVE-2026-46406","to":"CVE-2026-55607","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@anthropic-ai/claude-code","fromFixed":"2.1.128","toFixed":"2.1.163","daysApart":0}]}},{"cve":"CVE-2026-86063","published":"2026-10-13","fixed":"2.1.179","kev":false}],"package":"npm:@anthropic-ai/claude-code"}}