{"answers":{"affected":"2 open source packages ship an affected version, including @anthropic-ai/claude-code. It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-46406 in the wild and no public exploit code.","fix":"Upgrade @anthropic-ai/claude-code to 2.1.128 or later.","what":"CVE-2026-46406 is a medium-severity path traversal vulnerability in anthropics claude-code, published on 29 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-46406 and fix it if it is affected.\n\nWhat it is: CVE-2026-46406 is a medium-severity path traversal vulnerability in anthropics claude-code, published on 29 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2026-46406 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @anthropic-ai/claude-code (npm): affected from 2.1.59; fixed in 2.1.128\n- @anthropic-ai/claude-code (npm): affected from 2.1.59; fixed in 2.1.128\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-46406/ (Markdown: https://insights.sbomify.com/CVE-2026-46406/index.md)","id":"CVE-2026-46406","markdown":"https://insights.sbomify.com/CVE-2026-46406/index.md","name":"CVE-2026-46406","record":{"aliases":["GHSA-4vp2-6q8c-pvq2","MINI-7jrw-xrv3-pcw9","MINI-ch3q-w3rc-2w9r"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Claude Code CLI","requires_auth":"low_privilege","summary":"Local attackers can read privileged user responses or overwrite arbitrary files via symlink attacks due to insecure temporary file handling in the /copy command.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"claude_code","vendor":"anthropic"}],"cvss":{"score":4.4,"severity":"medium","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-377","name":"DEPRECATED: Insecure Temporary File"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Claude Code: Insecure Temporary File in /copy Command Enables Response Disclosure and Symlink-Based File Write","id":"CVE-2026-46406","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2026"},"n_packages":2,"n_references":1,"next":{"headline":"Vvveb: admin/auth-token IDOR allows unauthorized disclosure of administrator REST API tokens","id":"CVE-2026-46407"},"packages":[{"ecosystem":"npm","fixed":["2.1.128"],"introduced":["2.1.59"],"last_affected":[],"package":"@anthropic-ai/claude-code","purl":null,"source":"GHSA-4vp2-6q8c-pvq2"},{"ecosystem":"npm","fixed":["2.1.128"],"introduced":["2.1.59"],"last_affected":[],"package":"@anthropic-ai/claude-code","purl":"pkg:npm/%40anthropic-ai/claude-code","source":"GHSA-4vp2-6q8c-pvq2"}],"prev":{"headline":"OpenBao's Kerberos Auth Method Accumulates Unaccessible Tokens","id":"CVE-2026-46405"},"products":["claude-code"],"published":"2026-06-29","related":[{"cvss_score":8.7,"headline":"Claude Code Command Validation Bypass Allows Arbitrary Code Execution","id":"CVE-2025-66032","kev_date_added":null,"published":"2025-12-03"},{"cvss_score":8.7,"headline":"@anthropic-ai/claude-code has Sed Command Validation Bypass that Allows Arbitrary File Writes","id":"CVE-2025-64755","kev_date_added":null,"published":"2025-11-21"},{"cvss_score":8.7,"headline":"Claude Code's startup trust dialog could lead to Command Execution attack","id":"CVE-2025-59536","kev_date_added":null,"published":"2025-10-03"},{"cvss_score":8.7,"headline":"Claude Code rg command had Command Injection that allowed bypass of user approval prompt for command execution","id":"CVE-2025-58764","kev_date_added":null,"published":"2025-09-10"},{"cvss_score":8.7,"headline":"Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email","id":"CVE-2025-59041","kev_date_added":null,"published":"2025-09-10"},{"cvss_score":8.7,"headline":"Claude Code echo command allowed bypass of user approval prompt for command execution","id":"CVE-2025-54795","kev_date_added":null,"published":"2025-08-05"},{"cvss_score":7.7,"headline":"Claude Code: Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution","id":"CVE-2026-55607","kev_date_added":null,"published":"2026-06-29"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-06-29","vendors":["anthropics"]},"summary":"Local attackers can read privileged user responses or overwrite arbitrary files via symlink attacks due to insecure temporary file handling in the /copy command.","url":"https://insights.sbomify.com/CVE-2026-46406/"}