CVE-2026-103435: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Anthropic @anthropic-ai/claude-code
Description
Claude Code validated that a target file path resided within the project working directory at permission-check time, but re-resolved the path at write time without repeating that validation. This time-of-check to time-of-use (TOCTOU) gap allowed an attacker who could write to the workspace to atomically replace a project file with a symlink, causing Claude Code to follow the symlink and write its output to an arbitrary file outside the project sandbox. Exploitation required the ability to win a race condition against the write operation and write access to the shared workspace, enabling a lower-privileged attacker to redirect benign edits to sensitive files (e.g., shell configuration) in a higher-privileged session. Users on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version. Thank you to hackerone.com/c_h4ck_0 for reporting this issue.
CVSS v4.0
Score 7.7high
Affected software
Anthropic
@anthropic-ai/claude-code
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in @anthropic-ai/claude-code involves improper limitation of a pathname to a restricted directory (CWE-22) combined with a TOCTOU race condition. The software validates that a target file path is within the project directory during permission check but does not re-validate the path at write time. An attacker who can write to the shared workspace can exploit this by atomically replacing a project file with a symlink, causing the software to write output to arbitrary files outside the sandbox. This can redirect benign edits to sensitive files such as shell configuration files in higher-privileged sessions, potentially escalating privileges or compromising system integrity. The vulnerability has a CVSS 4.0 score of 7.7 (high severity).
Potential Impact
An attacker with write access to the shared workspace can exploit a race condition to cause the software to write data to arbitrary files outside the intended project directory. This can lead to unauthorized modification of sensitive files in higher-privileged sessions, potentially enabling privilege escalation or system compromise. The vulnerability affects the integrity of files and the security boundary enforced by the project sandbox.
Mitigation Recommendations
Users on the standard Claude Code auto-update channel have already received the fix. Users who perform manual updates should upgrade to the latest version of @anthropic-ai/claude-code to remediate this vulnerability. No additional mitigation steps are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Anthropic
- Date Reserved
- 2026-09-30T15:35:18.777Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ac643412cdf04f6564d0ab8
Added to database: 10/07/2026, 13:04:01 UTC
Last enriched: 10/07/2026, 13:18:25 UTC
Last updated: 10/07/2026, 18:56:12 UTC
Views: 20
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.