OS Command Injection in Claude Code - CVE-2026-25722
Published: April 30, 2026
Claude Code
Anthropic
Description
The vulnerability allows a remote attacker to create or modify files in protected directories without user confirmation.
The vulnerability exists due to improper input validation in directory change handling and write operations when processing untrusted content in a Claude Code context window. A remote attacker can use the cd command to navigate into sensitive directories such as .claude and perform write operations to create or modify files in protected directories without user confirmation.
Reliable exploitation requires the ability to add untrusted content into a Claude Code context window.