CVE-2026-41397: OpenClaw: OpenShell Mirror Sync — Sandbox Escape via Unrestricted File Sync + Symlink Traversal
The OpenShell extension in OpenClaw up to 2026.3.28 syncs files between the host and the sandbox without blocking symlinks or Git hook directories. Content from inside the sandbox can be written to host paths, which breaks the sandbox boundary. Fixed in 2026.3.31.
Published Apr 3, 2026 · Updated May 6, 2026 · Analysis Oct 30, 2026
What an attacker can do
OpenShell keeps a mirror of the workspace in the sandbox and syncs it both ways. In the affected versions the sync followed or copied symlinks and only excluded the hooks directory. Two things follow.
First, a symlink planted in the sandbox can make a sync-back write to a host location outside the workspace. Second, files that Git runs automatically, such as .git/hooks and git-hooks, could be written from the sandbox into the host workspace. The next git command on the host would then run attacker-chosen code.
The maintainers say the first fix (c02ee8) only excluded hooks, and the full symlink-free upload and download hardening came with the second (3b9dab0). An attacker needs to run code or influence files inside the sandbox, such as a prompt-injected agent. The CVSS 3.1 vector shows changed scope with high confidentiality and integrity impact. The result is file reads or writes and code execution on the host.
Who is affected
The npm package openclaw, versions 2026.3.28 and earlier, where the OpenShell extension syncs a workspace mirror between the host and the sandbox. Check the version:
npm ls openclaw
openclaw --versionDeployments that do not use the OpenShell sandbox backend do not use this code path.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.3.28
- Fixed in
- 2026.3.31
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.3.31, the first stable tag with the full fix.
npm install -g [email protected]The fix in extensions/openshell/src/mirror.ts and backend.ts copies trees with a function that skips symlinks and special files. It stages uploads in a symlink-free temp copy, and removes a symlink found on the sandbox side instead of following it. It also protects hooks, git-hooks and .git from being overwritten. The sources list no workaround.
How to tell if you were hit
In workspaces that used OpenShell sync, look for symlinks that point outside the workspace, and for changed files in .git/hooks, hooks and git-hooks that you did not write.
find . -type l -ls
ls -la .git/hooksCheck host files outside the workspace for unexpected recent modification. Beam records the file access and shell commands of an agent, and its rules can flag writes to Git hook files.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
OpenShell Mirror Sync: Sandbox Escape via Unrestricted File Sync + Symlink Traversal
Current Maintainer Triage
- Status: narrow
- Normalized severity: high
- Assessment: v2026.3.28 still has the mirror-boundary bug because shipped c02ee8 only excluded hooks while unreleased 3b9dab is the first full symlink-free upload and download hardening.
Affected Packages / Versions
- Package:
openclaw(npm) - Latest published npm version:
2026.3.31 - Vulnerable version range:
<=2026.3.28 - Patched versions:
>= 2026.3.31 - First stable tag containing the fix:
v2026.3.31
Fix Commit(s)
c02ee8a3a4cb390b23afdf21317aa8b2096854d1— 2026-03-25T19:59:07Z3b9dab0ece4643a9643e6a45459f5c709d3ce320— 2026-03-30T14:51:44+01:00
OpenClaw thanks @AntAISecurityLab for reporting.
Credited to AntAISecurityLab.
Questions
- Which OpenClaw version fixes the OpenShell mirror escape?
2026.3.31. Versions up to and including 2026.3.28 are affected. The two fix commits are c02ee8a and 3b9dab0.
- Why were two fix commits needed?
Per the maintainers, c02ee8 only excluded the hooks directory. Commit 3b9dab0 added the full symlink-free upload and download hardening.
- What does the attacker need?
The ability to put files or symlinks inside the sandbox mirror, for example through a prompt-injected agent. The CVSS vector lists low privileges and no user interaction.
References
Read for this analysis:
- https://github.com/openclaw/openclaw/security/advisories/GHSA-cwf8-44x6-32c2
- https://github.com/openclaw/openclaw/commit/c02ee8a3a4cb390b23afdf21317aa8b2096854d1
- https://github.com/openclaw/openclaw/releases/tag/v2026.3.31
- https://nvd.nist.gov/vuln/detail/CVE-2026-41397
- https://www.vulncheck.com/advisories/openclaw-sandbox-escape-via-unrestricted-file-sync-and-symlink-traversal
- https://github.com/advisories/GHSA-cwf8-44x6-32c2
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
