Critical, CVSS 9.3npmAmendedPublished
OpenClaude Sandbox Bypass via Model-Controlled dangerouslyDisableSandbox Input
CVE-2026-42074 · GHSA-m77w-p5jj-xmhg
- Affected
- npm openclaude < 0.5.1
- Fixed in
- 0.5.1· Vendor fix available
- Issue
- The dangerouslyDisableSandbox parameter is exposed as part of the BashTool input schema, meaning the LLM (an untrusted principal per the project's own threat model) can set it to true in any tooluse response. Combined with the default allowUnsandboxedCommands: true setting, a prompt-injected model can escape the sandbox for any arbitrary command, achieving full host-level code execution. Details The vulnerability exists in the shouldUseSandbox() function in src/tools/BashTool/shouldUseSandbox.ts (lines 130–153): The second guard, areUnsandboxedCommandsAllowed(), is defined in src/utils/sandbox/sandbox-adapter.ts (lines 474–477) and defaults to true: This means that out of the box, with default configuration, the LLM can bypass the sandbox for any command simply by including "dangerouslyDisableSandbox": true in its tool call input. The project's own trust model states: "The model/agent is not a trusted principal. Assume prompt/content injection can manipulate behavior." Yet…
Recommended action: Upgrade to 0.5.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.