Executive brief
OpenClaw's OpenShell mirror synchronization feature could be tricked into deleting the contents of unintended remote directories and replacing them with workspace data. If an attacker could modify configuration values, they could orchestrate destructive operations against arbitrary remote paths, leading to data loss on affected systems.
Technical details
This is a path-traversal vulnerability (CWE-22) in the OpenShell mirror backend. The vulnerability stems from insufficient validation of remoteWorkspaceDir and remoteAgentWorkspaceDir configuration values, which were accepted as arbitrary absolute paths. During mirror-mode synchronization, these paths were directly used as targets for remote cleanup and overwrite operations without proper scoping constraints. An attacker with the ability to influence these configuration values can specify malicious remote paths, causing the sync process to delete the contents of unintended directories and replace them with uploaded workspace data. The fix constrains mirror sync roots to prevent path traversal. Patched in version 2026.4.2 and later.
Affected products
- OpenClaw OpenClaw <= 2026.4.1
Timeline
- 2026-04-07: disclosed
- 2026-04-02: patched: Fix commit b21c9840c2e38f4bb338d031511b479d5f07ca25