CVE-2026-27522: OpenClaw: Message action attachment hydration bypasses local media root checks when sandboxRoot is unset
OpenClaw's `sendAttachment` and `setGroupIcon` message actions could read local files by absolute path when `sandboxRoot` was not set, skipping the local media root checks. That exposes any file the runtime user can read. Versions up to 2026.2.23 are affected. Upgrade the `openclaw` npm package to 2026.2.24.
Published Mar 2, 2026 · Updated Mar 18, 2026 · Analysis Oct 31, 2026
What an attacker can do
Message actions that attach files first hydrate the attachment payload. In hydrateAttachmentPayload (src/infra/outbound/message-action-params.ts), a set sandboxRoot led to validated reads. When sandboxRoot was unset, the code still loaded local absolute paths and did not apply the agent's allowed media roots. A path like /home/user/.ssh/id_rsa could be hydrated and sent as an attachment, or set as a group icon. This is path traversal and information exposure (CWE-22, CWE-200).
The trigger is an authorized message-action path. A user or agent who can cause sendAttachment or setGroupIcon to run with a chosen path, including through a prompt-injected agent, can have a file read and delivered into a chat. The CVSS 4.0 vector shows network access, no privileges and a high confidentiality impact, with no integrity or availability effect. Typical targets are API keys, SSH keys, .env files and config the runtime user can read.
Deployments that never leave sandboxRoot unset are not on this path. The advisory does not say the flaw is exploited in the wild.
Who is affected
Affected: the openclaw npm package at 2026.2.23 and earlier, when sandboxRoot is unset and the sendAttachment or setGroupIcon message actions are reachable. Setups with sandboxRoot configured follow the validated read path.
Check the version:
npm ls openclawFor a global install, use npm ls -g openclaw. Then check your configuration for whether a sandbox root is set.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.2.23
- Fixed in
- 2026.2.24
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.2.24 or later:
npm install [email protected]The fix (commit 270ab03e) passes the agent's mediaLocalRoots, from getAgentScopedMediaLocalRoots, to the hydration functions. When sandboxRoot is unset, the media loader now checks paths against those roots. New tests check that a file outside any allowed root is rejected with an "allowed directory" or "path-not-allowed" error. The advisory lists no workaround.
How to tell if you were hit
Review message-action logs for sendAttachment and setGroupIcon calls that carry absolute local paths outside your media directories, such as /etc, home directories or .ssh. Check chat history for unexpected attachments of config or key files. After the fix, such attempts are rejected with an error mentioning an allowed directory, so those errors in logs show probing. If Beam hooks cover the agent, its record of file access can show reads of secret files around the same time.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
sendAttachment and setGroupIcon message actions could hydrate media from local absolute paths when sandboxRoot was unset, bypassing intended local media root checks. This could allow reads of arbitrary host files reachable by the runtime user when an authorized message-action path was triggered.
Affected Packages / Versions
- Package:
openclaw(npm) - Latest published npm version at triage:
2026.2.23 - Vulnerable:
<= 2026.2.23 - Patched in code:
>= 2026.2.24(planned next release)
Remediation
Upgrade to openclaw 2026.2.24 or later once published.
Fix Commit(s)
- 270ab03e379f9653e15f7033c9830399b66b7e51
Release Process Note
patched_versions is pre-set to the planned next release (>= 2026.2.24). Once that npm release is published, this advisory can be published without further field edits.
OpenClaw thanks @GCXWLP for reporting.
Publication Update (2026-02-25)
[email protected] is published on npm and contains the fix commit(s) listed above. This advisory now marks >= 2026.2.24 as patched.
Credited to GCXWLP.
Questions
- Does CVE-2026-27522 apply if I set sandboxRoot?
The bug is on the path where
sandboxRootis unset. With a sandbox root, the older code validated reads against it.- What can an attacker read?
Any file the OpenClaw runtime user can read, delivered as a message attachment or group icon, once they can trigger an authorized message-action path.
- Which version fixes it?
2026.2.24. Versions up to and including 2026.2.23 are vulnerable.
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
