CVE-2026-41383: OpenClaw: OpenShell mirror mode could delete arbitrary remote directories when roots were mis-scoped
OpenClaw 2026.4.1 and earlier accepts any absolute path for the OpenShell settings remoteWorkspaceDir and remoteAgentWorkspaceDir. In mirror mode those paths become the target of remote cleanup and overwrite, so a mis-scoped value can wipe an unrelated remote directory. Upgrade to 2026.4.2.
Published Apr 7, 2026 · Updated Apr 28, 2026 · Analysis Oct 30, 2026
What an attacker can do
OpenShell's mirror backend syncs the local workspace to a remote sandbox. Before the fix, the config resolver in extensions/openshell/src/config.ts took remoteWorkspaceDir and remoteAgentWorkspaceDir as written, as long as they were absolute. Mirror sync then used them as the place to delete existing content and upload the workspace.
If an attacker can influence those config values, they can point the sync at a directory such as /tmp/victim or a home directory on the remote side. The sync deletes what is there and writes the uploaded workspace over it. The advisory calls this a destructive remote-path bug, a path-handling flaw (CWE-22). The CVSS vector shows a low integrity impact and no confidentiality impact.
The condition is influence over the plugin config. That may come from a shared or generated config, a pull request that changes it, or an agent that edits its own settings. A typo or misconfigured root causes the same damage with no attacker at all. Teams that use OpenShell mirror mode against remote hosts holding other data are exposed.
Who is affected
openclaw on npm, version 2026.4.1 and earlier, with the OpenShell extension in mirror mode. Check the installed version:
npm ls openclawUse npm ls -g openclaw for a global install. Then read your OpenShell plugin config and note the values of remoteWorkspaceDir and remoteAgentWorkspaceDir.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.4.1
- Fixed in
- 2026.4.2
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.4.2 or later:
npm install [email protected]Commit b21c9840c2e38f4bb338d031511b479d5f07ca25 normalizes both paths and accepts only /sandbox, /agent or paths beneath them. Anything else fails with the error "must stay under /sandbox or /agent". The advisory lists no workaround. Before upgrading, check that the two settings point only at managed sandbox roots and that no one else can edit them.
How to tell if you were hit
Read the OpenShell plugin config for remoteWorkspaceDir or remoteAgentWorkspaceDir values outside /sandbox and /agent. On remote hosts, look for directories that were emptied and refilled with workspace files, and for sync runs in the logs that name an unexpected target. After upgrading, a bad value shows up as a startup error naming the field. Beam keeps a record of config file edits and shell commands an agent ran, which can show who changed these settings.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Before OpenClaw 2026.4.2, the OpenShell mirror backend accepted arbitrary absolute remoteWorkspaceDir and remoteAgentWorkspaceDir values. In mirror mode, those paths were then used as the target of remote cleanup and overwrite operations.
Impact
If an attacker could influence those OpenShell config values, mirror sync could delete the contents of an unintended remote directory and replace them with uploaded workspace data. This was a destructive remote-path bug in the mirror-sync path.
Affected Packages / Versions
- Package:
openclaw(npm) - Affected versions:
<= 2026.4.1 - Patched versions:
>= 2026.4.2 - Latest published npm version:
2026.4.1
Fix Commit(s)
b21c9840c2e38f4bb338d031511b479d5f07ca25— constrain OpenShell mirror sync roots
Release Process Note
The fix is present on main and is staged for OpenClaw 2026.4.2. Publish this advisory after the 2026.4.2 npm release is live.
Thanks @jufeng123768 for reporting.
Credited to jufeng123768.
Questions
- Which version fixes CVE-2026-41383?
OpenClaw 2026.4.2. Versions up to and including 2026.4.1 are affected.
- Does the attacker need to be on the remote host?
No. They need to influence the OpenShell config values on the OpenClaw side. The sync then deletes and overwrites the target directory remotely.
- Which paths are allowed after the fix?
Only /sandbox, /agent and paths beneath them, after normalization. Relative paths and paths outside those roots are rejected.
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
