CVE-2026-25722: Anthropic Claude Code: write-protection bypass via directory navigation (CWE-20)
Versions of Claude Code before 2.0.57 did not properly validate directory changes combined with write operations to protected folders such as .claude. According to the record, this could allow files to be created or modified without user confirmation, and the issue is fixed in 2.0.57.
Overview
Claude Code is an agentic coding tool from Anthropic. According to the vendor advisory and the record, versions before 2.0.57 did not properly validate directory changes when combined with write operations to protected folders such as .claude. The weakness is classified as improper input validation (CWE-20).
Impact
- The record states that write protection on sensitive folders could be bypassed, allowing files to be created or modified without user confirmation.
- Reliable exploitation required the ability to place untrusted content into the Claude Code context window.
- NVD lists a score of 9.1 (critical), and the GitHub CNA lists 7.7 under its own scoring method.
Affected products and versions
- Anthropic Claude Code, versions before 2.0.57.
- The fixes list in the record is empty, but the description states the issue is patched in 2.0.57.
Exploitation status
- The CISA KEV catalog does not list this CVE in the record. No confirmed exploitation in the wild appears in the sources consulted.
Remediation and mitigation
- Update Claude Code to version 2.0.57 or later.
- Consult the vendor advisory GHSA-66q4-vfjg-2qhh for authoritative guidance.
- Until updated, limit the chance that untrusted content reaches Claude Code sessions, since reliable exploitation depended on it.
Detection guidance
- Review changes to sensitive configuration directories such as .claude and correlate them with user-approved actions.
- Inventory installations and identify any running versions before 2.0.57.
Limitations of the available information
- The record contains no EPSS or SSVC data and no KEV entry.
- Technical details of the vulnerable workflow are intentionally omitted.
- The record does not state whether other products or platforms are affected.
Frequently asked questions
Which versions of Claude Code are affected?
According to the record, versions before 2.0.57 are affected. The description states the issue is patched in 2.0.57.
Is this CVE known to be exploited in the wild?
The record does not list it in CISA KEV, and no confirmed exploitation appears in the sources consulted.
What should administrators do?
Update Claude Code to version 2.0.57 or later and follow the vendor advisory for guidance.
This analysis was drafted with AI assistance from verified source data and automatically checked against it.