Claude Code Has Sandbox Escape via Persistent Configuration Injection in settings.json
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Passive
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
Claude Code is an agentic coding tool. Prior to version 2.1.2, 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. This issue has been patched in version 2.1.2.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| anthropics | claude-code | before 2.1.2 | 2.1.2 | Patch available | CNA |
| — | @anthropic-ai/claude-code (npm) | before 2.1.2 | 2.1.2 | Patch available | GHSA-ff64-7w26-62rf |
- claude-code Vendoranthropics Affected before 2.1.2 Fixed in 2.1.2 Patch available CNA
- @anthropic-ai/claude-code (npm) Vendor— Affected before 2.1.2 Fixed in 2.1.2 Patch available GHSA-ff64-7w26-62rf
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* | before 2.1.2 | Vulnerable | anthropics |
- cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* Versions before 2.1.2 Vulnerable ·anthropics
Remediation
- Fix · CNA claude-code (anthropics) Fixed in 2.1.2
- Fix · GHSA-ff64-7w26-62rf @anthropic-ai/claude-code (npm) Fixed in 2.1.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-25725
- 2026-10-03 Alias added: GHSA-ff64-7w26-62rf
- 2026-10-04 EPSS moved to the 50th–90th percentile
- 2026-10-25 EPSS moved to the below the 50th percentile
References
More anthropics Claude Code vulnerabilities
- TI-2025-40558 Claude Code Command Validation Bypass Allows Arbitrary Code Execution CVSS 4.0HIGH 8.7
- TI-2025-36683 Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email CVSS 4.0HIGH 8.7
- TI-2025-37066 Claude Code's startup trust dialog could lead to Command Execution attack CVSS 4.0HIGH 8.7
- TI-2026-17554 Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation CVSS 4.0MEDIUM 5.3
- TI-2025-40093 @anthropic-ai/claude-code has Sed Command Validation Bypass that Allows Arbitrary File Writes CVSS 4.0HIGH 8.7
- TI-2025-36422 Claude Code rg command had Command Injection that allowed bypass of user approval prompt for command execution CVSS 4.0HIGH 8.7
Sources
- CVE-2026-25725 · CVE Program
- CVE-2026-25725 · NVD
- FIRST EPSS
- GHSA-ff64-7w26-62rf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences