CVE-2026-32007: OpenClaw: Experimental apply_patch may bypass workspace-only checks in opt-in sandbox mounts (off by default)
In OpenClaw 2026.2.22-2 and earlier, the experimental `apply_patch` tool skipped the workspace-only check for sandbox-mounted paths such as `/agent/...`. A patch could write or delete files on writable mounts outside the workspace. Default installs are not affected. Upgrade to openclaw 2026.2.23.
Published Mar 3, 2026 · Updated Mar 30, 2026 · Analysis Oct 31, 2026
What an attacker can do
In the sandbox path flow, apply_patch resolved targets with sandbox.bridge.resolvePath(...) but did not run the workspace-root assertion that other filesystem tools use. A patch aimed at a mounted path like /agent/pwned.txt therefore escaped the workspace root even when workspace-only mode was on.
The exposure needs an unusual opt-in setup, all at once: sandbox mode enabled (default is agents.defaults.sandbox.mode=off), the experimental tool enabled (default tools.exec.applyPatch.enabled=false), workspace-only expectations set through tools.fs.workspaceOnly=true or tools.exec.applyPatch.workspaceOnly=true, and writable mounts outside the workspace.
The caller needs low privileges, per the CVSS vectors. In practice that is an agent, or a prompt steering it, that can submit patches. It can then modify files on the mounted volume: config, scripts or data the host trusts. The workspace-only promise is the control that fails.
Who is affected
openclaw (npm) versions up to and including 2026.2.22-2. You are affected only if all of these hold: sandbox mode is on, tools.exec.applyPatch.enabled is true, workspace-only is expected via tools.fs.workspaceOnly or tools.exec.applyPatch.workspaceOnly, and the sandbox has writable mounts outside the workspace.
npm ls openclawThen check your OpenClaw config for those four settings.
openclaw
- Ecosystem
- npm
- Affected
- < 2026.2.23
- Fixed in
- 2026.2.23
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.2.23:
npm install [email protected]The fix calls assertSandboxPath for each patch target after the host path is resolved, with the working directory as root. A patch to /agent/pwned.txt now fails with "Path escapes sandbox root". Enforcement is on by default. Setting tools.exec.applyPatch.workspaceOnly=false turns it off, so leave that unset. As a stopgap, keep tools.exec.applyPatch.enabled at its default of false.
How to tell if you were hit
Check mounted paths outside the workspace, such as /agent, for files created or changed by agent runs, and review agent tool-call logs for apply_patch calls with targets outside the workspace root. After the upgrade, the same call logs a "Path escapes sandbox root" error. Beam records agent file access, so it can show writes to paths outside the project.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
In some opt-in sandbox configurations, the experimental apply_patch tool did not consistently apply workspace-only checks to mounted paths (for example /agent/...).
Impact
This does not affect default installs.
Default posture:
agents.defaults.sandbox.mode=off(sandbox disabled by default)tools.exec.applyPatch.enabled=false(experimental tool disabled by default)
This behavior applies only when all of the following are enabled/configured:
- sandbox mode,
- experimental
apply_patch, - workspace-only expectations (
tools.fs.workspaceOnly=trueand/ortools.exec.applyPatch.workspaceOnly=true), - and writable mounts outside workspace.
Under that opt-in setup, apply_patch operations could target mounted paths outside the workspace root.
Affected Packages / Versions
- Package:
openclaw(npm) - Affected published versions:
<= 2026.2.22-2 - Fixed in code on
main: commit6634030be31e1a1842967df046c2f2e47490e6bf - Patched release:
2026.2.23
Technical Details
In the sandbox path flow, apply_patch used sandbox.bridge.resolvePath(...) without applying the same workspace-root assertion used by other filesystem tools. The fix makes apply_patch follow the same workspace-only enforcement for sandbox-resolved paths (unless explicitly disabled with tools.exec.applyPatch.workspaceOnly=false).
Fix Commit(s)
6634030be31e1a1842967df046c2f2e47490e6bf
Release Process Note
patched_versions is pre-set to the released version (2026.2.23). Patched in 2026.2.23 and published.
OpenClaw thanks @tdjackey for reporting.
Credited to tdjackey.
Questions
- Are default OpenClaw installs affected by CVE-2026-32007?
No. The advisory says default installs are not affected: sandbox mode is off by default and the experimental
apply_patchtool is disabled by default.- What does the attacker get?
The ability to write or delete files through sandbox mounts outside the workspace root, bypassing the workspace-only setting. The limit is the set of writable mounts you configured.
- Which version fixes it?
openclaw 2026.2.23, which applies the same workspace-root check to
apply_patchas other file tools.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More OpenClaw vulnerabilities
All OpenClaw entriesCVE-2026-62197
OpenClaw: Browser CDP discovery could accept blocked WebSocket URLs
medium8.5Oct 21, 2026CVE-2026-35630
OpenClaw: QQBot native approval buttons did not enforce configured approver identity
high8.0Jul 2, 2026CVE-2026-53806
OpenClaw: Combined POSIX shell options could confuse exec revalidation
high8.8Jul 2, 2026CVE-2026-53809
OpenClaw: Embedded runner policy could be confused by provider aliases
medium3.8Jul 2, 2026CVE-2026-53810
OpenClaw's marketplace runtime extension metadata could point at unscanned payloads
high8.8Jul 2, 2026CVE-2026-53811
OpenClaw: Matrix allowFrom could bind to mutable display names
high8.8Jul 2, 2026
