<Vulnerability name="CVE-2026-46406">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-06-29T14:03:14</PublicDate>
    <Bugzilla id="2494423" url="https://bugzilla.redhat.com/show_bug.cgi?id=2494423" xml:lang="en:us">
@anthropic-ai/claude-code: Claude Code: Information disclosure and file overwrite via insecure temporary file in /copy command
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>6.8</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-59</CWE>
    <Details xml:lang="en:us" source="Mitre">
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.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Claude Code. The /copy command created responses in a predictable, world-readable temporary file without proper isolation or symlink protection. This allowed a local unprivileged user to read sensitive information from a privileged user's Claude response, potentially containing secrets or credentials. Additionally, an attacker could exploit this by planting a symlink to overwrite an arbitrary file with the response text.
    </Details>
    <Statement xml:lang="en:us">
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.
    </Statement>
    <Mitigation xml:lang="en:us">
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.
    </Mitigation>
    <PackageState cpe="cpe:/a:redhat:openshift_lightspeed">
        <ProductName>OpenShift Lightspeed</ProductName>
        <FixState>Fix deferred</FixState>
        <PackageName>openshift-lightspeed/lightspeed-agentic-sandbox-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift_devspaces:3">
        <ProductName>Red Hat OpenShift Dev Spaces</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>devspaces/pluginregistry-rhel9</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-46406
https://nvd.nist.gov/vuln/detail/CVE-2026-46406
https://github.com/anthropics/claude-code/security/advisories/GHSA-4vp2-6q8c-pvq2
    </References>
</Vulnerability>