Skip to main content

CVE-2026-103435: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Anthropic @anthropic-ai/claude-code

0
High
VulnerabilityCVE-2026-103435cvecve-2026-103435cwe-22cwe-61cwe-367
Published: 10/07/2026 (10/07/2026, 12:50:02 UTC)
Source: CVE Database V5
Vendor/Project: Anthropic
Product: @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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

Anthropic

@anthropic-ai/claude-code

Affected versions
>=0 <2.1.129

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/07/2026, 13:18:25 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses