Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-24053: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in anthropics claude-code

0
High
VulnerabilityCVE-2026-24053cvecve-2026-24053cwe-22cwe-79
Published: Tue Feb 03 2026 (02/03/2026, 20:49:59 UTC)
Source: CVE Database V5
Vendor/Project: anthropics
Product: claude-code

Description

Claude Code is an agentic coding tool. Prior to version 2.0.74, due to a Bash command validation flaw in parsing ZSH clobber syntax, it was possible to bypass directory restrictions and write files outside the current working directory without user permission prompts. Exploiting this required the user to use ZSH and the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.74.

AI-Powered Analysis

AILast updated: 02/03/2026, 21:14:40 UTC

Technical Analysis

CVE-2026-24053 is a path traversal vulnerability categorized under CWE-22 and CWE-79 affecting anthropics' Claude Code, an agentic coding tool. The vulnerability stems from a Bash command validation flaw when parsing ZSH clobber syntax, which allows attackers to circumvent directory restrictions designed to confine file operations within the current working directory. Specifically, if a user runs Claude Code on a system using the ZSH shell and an attacker can inject untrusted content into the Claude Code context window, the attacker can craft payloads that exploit the improper validation to write files outside the designated directory. This unauthorized file write capability can lead to arbitrary file creation or modification, potentially enabling code execution, data corruption, or disruption of service. The vulnerability does not require privileges or authentication but does require user interaction (injecting untrusted content). The CVSS 4.0 base score is 7.7 (high), reflecting network attack vector, low attack complexity, partial attack prerequisites, and high impact on confidentiality, integrity, and availability. The flaw was addressed in Claude Code version 2.0.74, which corrects the command validation logic to properly handle ZSH clobber syntax and enforce directory restrictions. No known exploits have been reported in the wild to date.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially those using Claude Code in development or automation environments on systems with ZSH as the shell. Successful exploitation could allow attackers to write malicious files outside restricted directories, potentially leading to unauthorized code execution, data tampering, or service disruption. This could compromise sensitive intellectual property, disrupt software development pipelines, or facilitate lateral movement within networks. Organizations in sectors with high reliance on secure software development, such as finance, healthcare, and critical infrastructure, are particularly at risk. The requirement for user interaction and ZSH usage somewhat limits the attack surface but does not eliminate it, especially in environments where developers or automated systems process untrusted inputs. The absence of known exploits reduces immediate risk but should not lead to complacency given the high severity and potential impact.

Mitigation Recommendations

European organizations should immediately upgrade anthropics Claude Code to version 2.0.74 or later to apply the official patch. Until upgrading is possible, restrict or sanitize all untrusted inputs that can be injected into Claude Code context windows to prevent malicious payloads. Implement strict shell environment controls, limiting the use of ZSH where feasible or enforcing hardened configurations that disable clobber syntax features. Employ application-level monitoring to detect anomalous file writes outside expected directories. Integrate runtime protection mechanisms that can intercept and block unauthorized file system operations. Educate developers and users about the risks of injecting untrusted content and encourage the use of least privilege principles. Regularly audit development tools and environments for compliance with security policies. Finally, maintain up-to-date backups and incident response plans to mitigate potential damage from exploitation.

Need more detailed analysis?Upgrade to Pro Console

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-01-20T22:30:11.778Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 698261daf9fa50a62fdf39e2

Added to database: 2/3/2026, 9:00:10 PM

Last enriched: 2/3/2026, 9:14:40 PM

Last updated: 2/3/2026, 11:03:49 PM

Views: 4

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 in Console -> Billing for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats