{"id":"CVE-2026-46406","state":"PUBLISHED","title":"Claude Code: Insecure Temporary File in /copy Command Enables Response Disclosure and Symlink-Based File Write","description":"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.","publishedAt":"2026-06-29T14:03:14.683Z","updatedAt":"2026-06-29T15:26:11.153Z","severity":{"score":4.4,"label":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["anthropics claude-code"],"affected":[{"vendor":"anthropics","product":"claude-code","versions":[{"version":">= 2.1.59, < 2.1.128","status":"affected"}]}],"references":["https://github.com/anthropics/claude-code/security/advisories/GHSA-4vp2-6q8c-pvq2"],"weaknesses":["CWE-59","CWE-200","CWE-377"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/46xxx/CVE-2026-46406.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46406","state":"PUBLISHED","datePublished":"2026-06-29T14:03:14.683Z","dateUpdated":"2026-06-29T15:26:11.153Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-05-13T21:04:10.932Z"},"containers":{"cna":{"title":"Claude Code: Insecure Temporary File in /copy Command Enables Response Disclosure and Symlink-Based File Write","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"anthropics","product":"claude-code","versions":[{"version":">= 2.1.59, < 2.1.128","status":"affected"}]}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-4vp2-6q8c-pvq2","name":"https://github.com/anthropics/claude-code/security/advisories/GHSA-4vp2-6q8c-pvq2","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"LOW","userInteraction":"ACTIVE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"LOW","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":4.4,"baseSeverity":"MEDIUM","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-59","lang":"en","description":"CWE-59: Improper Link Resolution Before File Access ('Link Following')","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-200","lang":"en","description":"CWE-200: Exposure of Sensitive Information to an Unauthorized Actor","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-377","lang":"en","description":"CWE-377: Insecure Temporary File","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-06-29T14:03:14.683Z"},"source":{"advisory":"GHSA-4vp2-6q8c-pvq2","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-29T15:25:46.123210Z","id":"CVE-2026-46406","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-29T15:26:11.153Z"}}]}}}