cve.bz

CVE-2026-46406 anthropic claude code: Link Following

4.4 mediumEPSS 0.2%Fix available

Medium (4.4) in anthropic claude code. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in @anthropic-ai/claude-code 2.1.128.

On this page
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.

Severity

CVSS 4.0

4.4 medium
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

CVSS 3.1

6.1 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 5th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-06-29. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-59 Improper Link Resolution Before File Access (Link Following)
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-377 Insecure Temporary File deprecated by MITRE
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-46406 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-46406?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-46406?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-46406 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
anthropic:claude_codefrom 2.1.58 before 2.1.128

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-4vp2-6q8c-pvq2npm@anthropic-ai/claude-code>=2.1.59 <2.1.1282.1.128

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

Red Hat rates this Moderate with a CVSS score of 6.8, higher than NIST's 6.1. The difference is in the confidentiality and integrity metrics.

Claude Code responses might contain secrets, API keys, credentials, and code, which is why Red Hat scores confidentiality as High rather than Low. On integrity, the symlink attack lets an unprivileged user redirect the write to any file the privileged process can touch — SSH authorized_keys, shell configs, application credentials. That can translate directly to privilege escalation, and Red Hat scores accordingly.

Exploitation requires a local account on the same system as the privileged user, who must also run the /copy command. The only Red Hat product shipping a vulnerable version is OpenShift Lightspeed (ships 2.1.123). Red Hat Dev Spaces ships 2.1.138 and is not affected.

Red Hat's mitigation

Update Claude Code to version 2.1.128 or later, which uses randomized, UID-isolated temporary file paths with symlink protection. If updating is not immediately possible, avoid using the /copy command on multi-user systems where untrusted local users have access to /tmp.

ProductPackageStateAdvisory
OpenShift Lightspeedopenshift-lightspeed/lightspeed-agentic-sandbox-rhel9Fix deferred
Red Hat OpenShift Dev Spacesdevspaces/pluginregistry-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-46406.

Attack patterns (CAPEC)

  • CAPEC-149 Explore for Predictable Temporary File Names Severity: Medium
  • CAPEC-155 Screen Temporary Files for Sensitive Information Likelihood: Medium · Severity: Medium
  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-200 (59).

References

Check your stackJSON