CVE-2026-25722
published high CVSS 4.0 · 7.7Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| anthropics | — | claude-code< 2.0.57 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 7.7 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| anthropics | claude-code | < 2.0.57 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-20 CWE-20: Improper Input Validation
- CWE-78 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
1Provider assertions
2GitHub_M · cna
Claude Code Vulnerable to Command Injection via Directory Change Bypasses Write Protection
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- e2171c16336a682eb97200119009586317f809b3b265546fc570b6ce7146a247
- Ingested
- 23 Sep 2026, 09:07:08 UTC
- Source record
- Official CVE record