CVE-2026-25722: Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection

Published Feb 6, 2026
·
Updated

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.

Users on standard Claude Code auto-update received this fix automatically. Users performing manual updates are advised to update to the latest version.

About Claude Code thanks hackerone.com/nil221 for reporting this issue!

Other sources

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.

MITRE

Affected Software

3 affected componentsFixes available
Claude Claude Code<2.0.57
npm/@anthropic-ai/claude-code<2.0.57
2.0.57
Anthropic Claude Code Node.js<2.0.57

Event History

Feb 6, 2026
CVE Published
via MITRE·05:52 PM
Data Sourced
via MITRE·05:52 PM
DescriptionWeakness
Data Sourced
via NVD·06:15 PM
DescriptionSeverityWeaknessAffected Software
Advisory Published
via GitHub·07:02 PM
Data Sourced
via GitHub·07:02 PM
DescriptionWeaknessAffected Software
Jun 19, 58090
Event
via FIRST·04:33 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-25722?

CVE-2026-25722 is considered a high severity vulnerability due to its potential for command injection via directory changes.

2

How do I fix CVE-2026-25722?

To fix CVE-2026-25722, update to Claude Code version 2.0.57 or later, where the vulnerability has been addressed.

3

What are the potential impacts of CVE-2026-25722?

The potential impacts of CVE-2026-25722 include unauthorized access to sensitive directories and execution of arbitrary commands.

4

Which versions of Claude Code are affected by CVE-2026-25722?

CVE-2026-25722 affects all versions of Claude Code prior to version 2.0.57.

5

Is there a workaround for CVE-2026-25722?

There are no specified workarounds for CVE-2026-25722; updating to the latest version is recommended for mitigation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203