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

- Severity: High 7.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 44% of CVEs (2026-12-01)
- Published: 2026-02-06T17:52:42.069Z
- Modified: 2026-06-17T10:25:06.257Z
- Also known as: GHSA-66q4-vfjg-2qhh
- Weaknesses: CWE-20, CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: 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.

(As written by CVE List.)

## Affected

- anthropics claude-code: < 2.0.57
- @anthropic-ai/claude-code (npm): before 2.0.57
- anthropic claude_code: before 2.0.57

## Every score

- GitHub_M: CVSS:4.0 7.7 High `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`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 9.1 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H`

## References

- <https://github.com/anthropics/claude-code/security/advisories/GHSA-66q4-vfjg-2qhh> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25722> (advisory)
- <https://github.com/anthropics/claude-code> (package)

## Sources

- CVE List: [CVE-2026-25722](https://www.cve.org/CVERecord?id=CVE-2026-25722), CVE Terms of Use, modified 2026-02-06
- GitHub Advisory Database: [GHSA-66q4-vfjg-2qhh](https://github.com/advisories/GHSA-66q4-vfjg-2qhh), CC-BY-4.0, modified 2026-02-06
- NVD: [CVE-2026-25722](https://nvd.nist.gov/vuln/detail/CVE-2026-25722), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25722 · Whole record: https://cve.day/CVE-2026-25722.json · Rebuilt by cve.day 2026-11-25T22:59:13.561Z
