{"id":"CVE-2026-46406","aliases":["CVE-2026-46406","GHSA-4vp2-6q8c-pvq2"],"related":[],"kind":"vulnerability","state":"published","title":"Claude Code: Insecure Temporary File in /copy Command Enables Response Disclosure and Symlink-Based File Write","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"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.\n\nUsers on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version.\n\nClaude Code thanks hackerone.com/c_h4ck_0 for reporting this issue.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Claude Code es una herramienta de codificación agéntica. Desde la versión 2.1.59 hasta la 2.1.128, el comando /copy de Claude Code escribía las respuestas en una ruta codificada de forma rígida y predecible (/tmp/claude/response.md) sin aislamiento de UID, aleatoriedad o protección contra enlaces simbólicos. El archivo se creaba con permisos de lectura para todos (0644) en un directorio transitable por todos (0755), lo que permitía a cualquier usuario local leer la respuesta de Claude de un usuario privilegiado, que podría contener secretos o credenciales. Además, debido a que la ruta era estática y predecible, un atacante local podría pre-crear el directorio y colocar un enlace simbólico en la ruta de archivo esperada, haciendo que el proceso privilegiado siguiera el enlace simbólico y sobrescribiera un archivo elegido por el atacante con el texto de la respuesta. Explotar esto requería un usuario local sin privilegios en el mismo sistema y un usuario privilegiado para ejecutar el comando /copy. Esta vulnerabilidad está corregida en la versión 2.1.128.","source":"nvd"}],"published":"2026-06-25T16:53:00.000Z","modified":"2026-10-25T21:10:00.770Z","severity":{"scorer":"GitHub_M","scheme":"CVSS: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","score":4.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS: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","score":4.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS: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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:H","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-59","CWE-200","CWE-377"],"affected":[{"ranges":[{"version":">= 2.1.59, < 2.1.128","status":"affected"}],"vendor":"anthropics","product":"claude-code","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.1.59","status":"affected","fixed":"2.1.128"}],"ecosystem":"npm","package":"@anthropic-ai/claude-code","purl":"pkg:npm/%40anthropic-ai/claude-code","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.1.58","fixed":"2.1.128"}],"vendor":"anthropic","product":"claude_code","cpe":"cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-4vp2-6q8c-pvq2","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/anthropics/claude-code","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-29T15:25:46.123Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46406","url":"https://www.cve.org/CVERecord?id=CVE-2026-46406","licence":"CVE Terms of Use","modified":"2026-06-29T15:26:11.153Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4vp2-6q8c-pvq2","url":"https://github.com/advisories/GHSA-4vp2-6q8c-pvq2","licence":"CC-BY-4.0","modified":"2026-07-09T05:15:08.591Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46406","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46406","licence":"Public domain","modified":"2026-10-25T21:10:00.770Z"}],"updatedAt":"2026-11-25T22:59:26.615Z","epss":{"score":0.00118,"percentile":0.0189,"date":"2026-12-01T12:00:22.000Z"}}