Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

CVE-2026-46406 — @anthropic-ai/claude-code

CVE-2026-46406 is a CWE-59 vulnerability in @anthropic-ai/claude-code. A fix is available for @anthropic-ai/claude-code — see the affected versions and patch details below.

Claude Code: Insecure Temporary File in /copy Command Enables Response Disclosure and Symlink-Based File Write

Also known asGHSA-4vp2-6q8c-pvq2
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-46406.

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs4th percentile — riskier than 4% of all scored CVEsHighest risk
0.00%0.22%0.44%0.65%0.1%0.1%0.2%0.2%0.2%Jul 26Sep 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

279other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@anthropic-ai/claude-codenpm
7.2Mdownloads / week

Description

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.

Users on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version.

Claude Code thanks hackerone.com/c_h4ck_0 for reporting this issue.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@anthropic-ai/claude-code≥ 2.1.59&&< 2.1.1282.1.128npm install @anthropic-ai/claude-code@2.1.128

Affected Products

1 product · 1 configurations
Application
claude codeanthropic
≥ 2.1.58 && < 2.1.128
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @anthropic-ai/claude-code, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @anthropic-ai/claude-code to 2.1.128 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-46406 is resolved across your whole dependency graph.

  3. Workarounds

    Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

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…

Workaround published by Red Hat
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.
Source: Red Hat security advisory for CVE-2026-46406 (CC BY 4.0)

Frequently Asked Questions

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-cho
O3 Security · Impact-Aware SCA

Is CVE-2026-46406 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-46406: @anthropic-ai/claude — Fixed in 2.1.128