File Injection Vulnerability in Claude Code by Anthropic
CVE-2026-25725
7.7HIGH
What is CVE-2026-25725?
The vulnerability in Claude Code arises from its sandboxing mechanism, which inadequately secures the .claude/settings.json file when this configuration file is absent at startup. Despite proper protections in place for .claude/settings.local.json, the absence of settings.json allowed malicious code within the sandbox to create this file. This exploitation could lead to the injection of persistent hooks, such as SessionStart commands, executing with host privileges upon the restart of Claude Code. This security flaw was addressed and patched in version 2.1.2.
Affected Version(s)
claude-code < 2.1.2
