CVE-2026-25722: CWE-20: Improper Input Validation in anthropics claude-code
Claude Code is an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.
AI Analysis
Technical Summary
CVE-2026-25722 is a vulnerability classified under CWE-20 (Improper Input Validation) and CWE-78 (Improper Neutralization of Special Elements used in an OS Command) affecting anthropics Claude Code, an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when users issued the cd command combined with write operations targeting protected folders such as the .claude directory. This improper validation allowed attackers who could inject untrusted content into the Claude Code context window to navigate into sensitive directories and bypass write protections. Consequently, attackers could create or modify files without triggering user confirmation or security controls designed to prevent unauthorized changes. The vulnerability is exploitable remotely over the network with low attack complexity, requiring partial user interaction but no privileges or authentication. The impact includes potential unauthorized modification or creation of files in protected directories, threatening confidentiality, integrity, and availability of critical data or configurations. The issue was addressed and patched in Claude Code version 2.0.57. No known public exploits have been reported yet, but the vulnerability’s characteristics warrant prompt remediation.
Potential Impact
For European organizations, this vulnerability could lead to unauthorized modification or creation of files within protected directories of Claude Code installations, potentially compromising sensitive project data, configuration files, or intellectual property. Attackers could leverage this to implant malicious code, disrupt development workflows, or exfiltrate confidential information. The agentic nature of Claude Code means automated or semi-automated code generation and execution could be manipulated, increasing risk of supply chain or internal sabotage attacks. Organizations relying on Claude Code for software development or automation may face operational disruptions and data integrity issues. The network-exploitable nature and low complexity increase the likelihood of exploitation if untrusted input injection is possible, especially in collaborative or multi-user environments. This could also impact compliance with European data protection regulations if sensitive data is exposed or altered.
Mitigation Recommendations
European organizations should immediately upgrade all anthropics Claude Code installations to version 2.0.57 or later to apply the official patch. Additionally, restrict or sanitize all untrusted input sources that can be injected into Claude Code context windows to prevent exploitation. Implement strict access controls and monitoring on directories like .claude to detect unauthorized changes. Employ application whitelisting and file integrity monitoring to alert on unexpected file modifications. Educate developers and users on the risks of injecting untrusted content and enforce secure coding and usage practices. Network segmentation and limiting exposure of Claude Code instances to untrusted networks can reduce attack surface. Finally, integrate vulnerability scanning and patch management processes to ensure timely updates of development tools.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Italy
CVE-2026-25722: CWE-20: Improper Input Validation in anthropics claude-code
Description
Claude Code is an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when combined with write operations to protected folders. By using the cd command to navigate into sensitive directories like .claude, it was possible to bypass write protection and create or modify files without user confirmation. Reliably exploiting this required the ability to add untrusted content into a Claude Code context window. This issue has been patched in version 2.0.57.
AI-Powered Analysis
Technical Analysis
CVE-2026-25722 is a vulnerability classified under CWE-20 (Improper Input Validation) and CWE-78 (Improper Neutralization of Special Elements used in an OS Command) affecting anthropics Claude Code, an agentic coding tool. Prior to version 2.0.57, Claude Code failed to properly validate directory changes when users issued the cd command combined with write operations targeting protected folders such as the .claude directory. This improper validation allowed attackers who could inject untrusted content into the Claude Code context window to navigate into sensitive directories and bypass write protections. Consequently, attackers could create or modify files without triggering user confirmation or security controls designed to prevent unauthorized changes. The vulnerability is exploitable remotely over the network with low attack complexity, requiring partial user interaction but no privileges or authentication. The impact includes potential unauthorized modification or creation of files in protected directories, threatening confidentiality, integrity, and availability of critical data or configurations. The issue was addressed and patched in Claude Code version 2.0.57. No known public exploits have been reported yet, but the vulnerability’s characteristics warrant prompt remediation.
Potential Impact
For European organizations, this vulnerability could lead to unauthorized modification or creation of files within protected directories of Claude Code installations, potentially compromising sensitive project data, configuration files, or intellectual property. Attackers could leverage this to implant malicious code, disrupt development workflows, or exfiltrate confidential information. The agentic nature of Claude Code means automated or semi-automated code generation and execution could be manipulated, increasing risk of supply chain or internal sabotage attacks. Organizations relying on Claude Code for software development or automation may face operational disruptions and data integrity issues. The network-exploitable nature and low complexity increase the likelihood of exploitation if untrusted input injection is possible, especially in collaborative or multi-user environments. This could also impact compliance with European data protection regulations if sensitive data is exposed or altered.
Mitigation Recommendations
European organizations should immediately upgrade all anthropics Claude Code installations to version 2.0.57 or later to apply the official patch. Additionally, restrict or sanitize all untrusted input sources that can be injected into Claude Code context windows to prevent exploitation. Implement strict access controls and monitoring on directories like .claude to detect unauthorized changes. Employ application whitelisting and file integrity monitoring to alert on unexpected file modifications. Educate developers and users on the risks of injecting untrusted content and enforce secure coding and usage practices. Network segmentation and limiting exposure of Claude Code instances to untrusted networks can reduce attack surface. Finally, integrate vulnerability scanning and patch management processes to ensure timely updates of development tools.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-05T16:48:00.425Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69862fadf9fa50a62f2569b2
Added to database: 2/6/2026, 6:15:09 PM
Last enriched: 2/6/2026, 6:29:57 PM
Last updated: 2/6/2026, 7:18:45 PM
Views: 2
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.
Related Threats
CVE-2026-2063: OS Command Injection in D-Link DIR-823X
MediumCVE-2026-25753: CWE-259: Use of Hard-coded Password in Praskla-Technology assessment-placipy
CriticalCVE-2026-25752: CWE-862: Missing Authorization in frangoteam FUXA
CriticalCVE-2026-25751: CWE-306: Missing Authentication for Critical Function in frangoteam FUXA
CriticalCVE-2026-25651: CWE-601: URL Redirection to Untrusted Site ('Open Redirect') in tgies client-certificate-auth
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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.