CVE-2026-25725: CWE-501: Trust Boundary Violation in anthropics claude-code
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.
AI Analysis
Technical Summary
CVE-2026-25725 is a vulnerability classified under CWE-501 (Trust Boundary Violation) and CWE-668 (Exposure of Resource to Wrong Sphere) affecting anthropics' Claude Code, an agentic coding tool. The vulnerability stems from a flaw in the bubblewrap sandboxing mechanism used by Claude Code prior to version 2.1.2. Specifically, the sandbox failed to protect the .claude/settings.json configuration file if it did not exist at startup. Although the parent directory was mounted as writable and the .claude/settings.local.json file was explicitly set as read-only, the absence of settings.json allowed malicious sandboxed code to create this file. By doing so, an attacker could inject persistent hooks, such as SessionStart commands, which execute with host-level privileges when Claude Code restarts. This effectively allows sandbox escape and privilege escalation without requiring prior authentication, though user interaction is necessary to trigger the restart. The vulnerability has a CVSS 4.0 base score of 7.7, reflecting its network attack vector, low attack complexity, and high impact on confidentiality, integrity, and availability. No known exploits have been reported in the wild as of the publication date. The issue was addressed in version 2.1.2 by ensuring proper protection of the settings.json file regardless of its existence at startup, closing the trust boundary gap. This vulnerability highlights the critical importance of comprehensive sandboxing and file system protections in agentic tools that execute code with elevated privileges.
Potential Impact
For European organizations, the impact of CVE-2026-25725 can be significant, especially for those relying on Claude Code for automated or agentic coding tasks. Successful exploitation allows attackers to escalate privileges from a sandboxed environment to the host system, potentially leading to unauthorized code execution with elevated rights. This could compromise sensitive intellectual property, source code integrity, and system availability. The persistence mechanism via configuration file manipulation means attackers could maintain long-term footholds, complicating incident response. Organizations in sectors with high reliance on software development automation, such as finance, telecommunications, and critical infrastructure, face increased risks. Additionally, the vulnerability could be leveraged in supply chain attacks or insider threat scenarios. Given the network attack vector and low complexity, attackers could exploit this vulnerability remotely if user interaction occurs, increasing the threat surface. The absence of known exploits currently provides a window for proactive mitigation, but the high severity demands urgent attention.
Mitigation Recommendations
European organizations should immediately upgrade Claude Code to version 2.1.2 or later to apply the official patch that properly secures the settings.json file. Until patching is complete, implement strict file system monitoring on the .claude directory to detect unauthorized creation or modification of settings.json and related configuration files. Employ host-based intrusion detection systems (HIDS) to alert on suspicious file changes and process executions linked to Claude Code. Restrict write permissions on the parent directory and configuration files to the minimum necessary users and processes. Consider running Claude Code within additional containment layers such as virtual machines or hardened containers to limit host impact if sandbox escape occurs. Educate users about the risks of restarting the application after suspicious activity and enforce policies to validate code and scripts executed within Claude Code. Finally, integrate vulnerability scanning and software composition analysis into the development pipeline to detect outdated versions proactively.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Italy
CVE-2026-25725: CWE-501: Trust Boundary Violation in anthropics claude-code
Description
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-25725 is a vulnerability classified under CWE-501 (Trust Boundary Violation) and CWE-668 (Exposure of Resource to Wrong Sphere) affecting anthropics' Claude Code, an agentic coding tool. The vulnerability stems from a flaw in the bubblewrap sandboxing mechanism used by Claude Code prior to version 2.1.2. Specifically, the sandbox failed to protect the .claude/settings.json configuration file if it did not exist at startup. Although the parent directory was mounted as writable and the .claude/settings.local.json file was explicitly set as read-only, the absence of settings.json allowed malicious sandboxed code to create this file. By doing so, an attacker could inject persistent hooks, such as SessionStart commands, which execute with host-level privileges when Claude Code restarts. This effectively allows sandbox escape and privilege escalation without requiring prior authentication, though user interaction is necessary to trigger the restart. The vulnerability has a CVSS 4.0 base score of 7.7, reflecting its network attack vector, low attack complexity, and high impact on confidentiality, integrity, and availability. No known exploits have been reported in the wild as of the publication date. The issue was addressed in version 2.1.2 by ensuring proper protection of the settings.json file regardless of its existence at startup, closing the trust boundary gap. This vulnerability highlights the critical importance of comprehensive sandboxing and file system protections in agentic tools that execute code with elevated privileges.
Potential Impact
For European organizations, the impact of CVE-2026-25725 can be significant, especially for those relying on Claude Code for automated or agentic coding tasks. Successful exploitation allows attackers to escalate privileges from a sandboxed environment to the host system, potentially leading to unauthorized code execution with elevated rights. This could compromise sensitive intellectual property, source code integrity, and system availability. The persistence mechanism via configuration file manipulation means attackers could maintain long-term footholds, complicating incident response. Organizations in sectors with high reliance on software development automation, such as finance, telecommunications, and critical infrastructure, face increased risks. Additionally, the vulnerability could be leveraged in supply chain attacks or insider threat scenarios. Given the network attack vector and low complexity, attackers could exploit this vulnerability remotely if user interaction occurs, increasing the threat surface. The absence of known exploits currently provides a window for proactive mitigation, but the high severity demands urgent attention.
Mitigation Recommendations
European organizations should immediately upgrade Claude Code to version 2.1.2 or later to apply the official patch that properly secures the settings.json file. Until patching is complete, implement strict file system monitoring on the .claude directory to detect unauthorized creation or modification of settings.json and related configuration files. Employ host-based intrusion detection systems (HIDS) to alert on suspicious file changes and process executions linked to Claude Code. Restrict write permissions on the parent directory and configuration files to the minimum necessary users and processes. Consider running Claude Code within additional containment layers such as virtual machines or hardened containers to limit host impact if sandbox escape occurs. Educate users about the risks of restarting the application after suspicious activity and enforce policies to validate code and scripts executed within Claude Code. Finally, integrate vulnerability scanning and software composition analysis into the development pipeline to detect outdated versions proactively.
Affected Countries
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-05T16:48:00.426Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69862fadf9fa50a62f2569bb
Added to database: 2/6/2026, 6:15:09 PM
Last enriched: 2/6/2026, 6:29:30 PM
Last updated: 3/22/2026, 2:15:24 AM
Views: 159
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.