CVE-2026-24053

Cluade Code has a Path Restriction Bypass via ZSH Clobber which Allows Arbitrary File Writes

Published Feb 3, 2026 CVSS 4.0 · 7.7 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Claude Code, an agentic coding tool, had a flaw in its Bash command validation that allowed the parsing of ZSH clobber syntax to bypass directory restrictions and write files outside the current working directory. The vulnerability, identified as CWE‑22 and CWE‑79, means an attacker can create or overwrite arbitrary files on the host system without any user permission prompt. The effect is a compromise of file-system integrity and potentially the confidentiality of data if sensitive files are overwritten or malicious code is injected.

Affected Systems

The flaw affects versions of Claude Code prior to 2.0.74 released by Anthropic. The vulnerability applies to the standard node.js binary distribution of the tool and requires the user to be running ZSH to trigger the clobber syntax. No specific sub‑versions beyond the 2.0.74 threshold are listed as affected.

Risk and Exploitability

The CVSS score of 7.7 indicates a high severity, but the EPSS score of less than 1% suggests exploitation is unlikely at present. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires the attacker to have the ability to inject untrusted content into a Claude Code context window while the shell engine is ZSH. The attack surface is limited to users who have run Claude Code with ZSH and have provided contextual input that contains the clobber syntax. Based on the description, the likely attack vector is through crafted user input in the context window rather than a network-based payload.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Claude Code to version 2.0.74 or later to receive the fix for the clobber‑syntax validation flaw.
  • If an upgrade is not immediately possible, avoid using ZSH when executing Claude Code or remove any ZSH clobber syntax from context windows.
  • Ensure that only trusted content is added to context windows and validate all input before it reaches the command‑parsing stage.

Generated by OpenCVE AI on April 18, 2026 at 00:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-q728-gf8j-w49r Claude Code has a Path Restriction Bypass via ZSH Clobber which Allows Arbitrary File Writes
History
Type Values Removed Values Added
First Time appeared Anthropic
Anthropic claude Code
CPEs cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*
Vendors & Products Anthropic
Anthropic claude Code
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N'}

Type Values Removed Values Added
First Time appeared Anthropics
Anthropics claude Code
Vendors & Products Anthropics
Anthropics claude Code
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Cluade Code has a Path Restriction Bypass via ZSH Clobber which Allows Arbitrary File Writes
Weaknesses CWE-22
CWE-79
References
Metrics cvssV4_0

{'score': 7.7, 'vector': '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'}

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Feb 3, 2026, 9:22 PM
Reserved
Jan 20, 2026, 10:30 PM
Status
Analyzed
Published
Feb 3, 2026, 9:16 PM
Modified
Jun 17, 2026, 10:22 AM