The vulnerability is a sandbox bypass in OpenClaude, where the Language Model (LLM) can execute arbitrary code on the host machine. The root cause lies in the shouldUseSandbox function, which decides whether to run a command in a sandboxed environment. This function incorrectly trusted a model-controlled parameter, dangerouslyDisableSandbox, in the input for BashTool and PowerShellTool.
The analysis of the patch commit aab489055c53dd64369414116fe93226d2656273 reveals the key vulnerable functions. The core of the flaw was in shouldUseSandbox, which would disable sandboxing if dangerouslyDisableSandbox was true, because the secondary check, areUnsandboxedCommandsAllowed, defaulted to true.
The patch addresses this by introducing a new internal flag, _dangerouslyDisableSandboxApproved, which cannot be set by the model. The shouldUseSandbox function now requires this flag to be true before disabling the sandbox. Furthermore, the model-facing input schemas for BashTool and PowerShellTool were updated to remove the dangerouslyDisableSandbox parameter entirely, preventing the model from influencing this security-critical decision. Functions like runPowerShellCommand and normalizeToolInput were also part of the vulnerable execution flow as they propagated the malicious input to the decision-making logic.