CVE-2026-25722CWE-20CWE-78

Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection

High · published February 6, 2026

CVSS v4.0
7.7
EPSS
1%
Percentile
52.5
In the wild
Unconfirmed
What it is

⚡ Just navigate into a sensitive directory with a simple command, and you've unlocked a treasure chest of trouble! Think of it like a delivery driver who misreads an address, leading them to drop off a package in a restricted area instead of the intended recipient—now, anyone could access valuable files without a security check! This vulnerability allows an attacker to bypass write protection in crucial directories, enabling them to create or modify files without user consent. Imagine the chaos if unauthorized changes were made to your critical files—data could be corrupted, sensitive information leaked, or worse, malicious code introduced!

Put simply

Think of it like a delivery driver who misreads an address, leading them to drop off a package in a restricted area instead of the intended recipient—now, anyone could access valuable files without a security check! CVE-2026-25722 arises from Claude Code not validating directory changes when performing write operations in protected folders. By navigating to directories like .claude using the 'cd' command, untrusted content can be executed without confirmation.

What to do

This vulnerability allows an attacker to bypass write protection in crucial directories, enabling them to create or modify files without user consent. Imagine the chaos if unauthorized changes were made to your critical files—data could be corrupted, sensitive information leaked, or worse, malicious code introduced! Update your Claude Code to version 2.0.57 immediately to close this gap. Review your directories to ensure no unauthorized changes have occurred and consider implementing additional monitoring to catch any suspicious activity. You've got this! Follow these steps and you'll keep your coding environment secure. 🛡️

The record
Technical detail
CVSS v4.0
7.7 · HIGH
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
EPSS
0.00696 · 52.5th percentile
Weaknesses
CWE-20 · Improper Input Validation; CWE-78 · Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Published
2026-02-06T17:52Z
EPSS history
Timeline
  • 06 FEB 17:52Z
    Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection
    cvelistv5