Sandbox Escape via Persistent Configuration Injection in settings.json
High7.7CVE-2026-25725 · Published Feb 6, 2026
Claude Code's bubblewrap sandboxing mechanism failed to properly protect the .claude/settings.json configuration file when it did not exist at startup. While the parent directory was mounted as writable and .claude/settings.local.json was explicitly protected with read-only constraints, settings.json was not protected if it was missing. This allowed malicious code running inside the sandbox to create this file and inject persistent hooks (such as SessionStart commands) that would execute with host privileges when Claude Code was restarted. Users on standard Claude Code auto-update received this fix automatically. Users performing manual updates are advised to update to the latest version. Thank you to hackerone.com/edbr for reporting this issue!
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| @anthropic-ai/claude-code npm | < v2.1.2 | v2.1.2 |
Details and references
More Anthropic advisories
All Anthropic| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Feb 6 | Command Injection via Directory Change Bypasses Write Protection | High7.7 | v2.0.57 |
| Feb 6 | Command Injection via Piped sed Command Bypasses File Write Restrictions | High7.7 | v2.0.55 |
| Feb 6 | Permission Deny Bypass Through Symbolic Links | Low2.3 | v2.1.7 |
| Feb 3 | Command Injection in find Command Bypasses User Approval Prompt | High7.7 | v2.0.72 |
| Feb 3 | Path Restriction Bypass via ZSH Clobber Allows Arbitrary File Writes | High7.7 | v2.0.74 |
| Feb 3 | Domain Validation Bypass Allows Automatic Requests to Attacker-Controlled Domains | High7.1 | v1.0.111 |