GHSA-9mph-4f7v-fmvh: OpenClaw has agent avatar symlink traversal in gateway session metadata
OpenClaw from v2026.1.21 up to but not including 2026.2.22 can be made to read an arbitrary local file through an agent avatar path that is a symlink. The gateway returns the file contents as a base64 data URL in the agents.list response. Upgrade the npm package openclaw to 2026.2.22.
Published Mar 4, 2026 · Analysis Nov 7, 2026
What an attacker can do
resolveIdentityAvatarUrl in src/gateway/session-utils.ts turns an agent's local avatar path into a data: URL for gateway responses. It did not resolve the path with realpath, so a symlink inside the agent workspace could point to a file outside it. The gateway read that file with its own rights, encoded it in base64 and put it in avatarUrl.
The agents.list call can return that payload, which is how the content leaves the host. The result is a local file read in the gateway process context. The CVSS 4.0 vector is local with no privileges, and rates confidentiality impact high and the others none.
An attacker needs a way to set an agent's avatar path to a symlink they control, or to place a symlink in the workspace that the avatar path resolves through, and the ability to call agents.list or read its output. That can happen through a shared workspace, a cloned repository holding a symlink, or an agent that is steered into creating one. Files readable by the gateway, such as keys and tokens in the user's home directory, are the likely targets. The advisory does not describe a specific exploit chain.
Who is affected
The npm package openclaw, below 2026.2.22. The advisory says the bug was introduced in v2026.1.21 and affects published versions up to 2026.2.21-2. Check the version:
npm ls openclawopenclaw
- Ecosystem
- npm
- Affected
- < 2026.2.22
- Fixed in
- 2026.2.22
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.2.22:
npm install [email protected]The fix, commit 3d0337504349954237d09e4d957df5cb844d5e77, resolves workspace and avatar paths with realpath and enforces containment. It opens files with O_NOFOLLOW where available, and compares file identity (dev and ino) before and after opening to block swap races. Symlinks that stay inside the workspace remain allowed. The advisory lists no workaround.
How to tell if you were hit
Find symlinks in agent workspaces that point outside them:
find /path/to/workspace -type l -lname '/*'Review agent identity settings for avatar paths that are not plain image files. Look in gateway logs for agents.list responses with unusually large avatarUrl values. Beam records agent file access and shell commands, which helps show when an agent created a symlink that the gateway later followed.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
A crafted local avatar path could follow a symlink outside the agent workspace and return arbitrary file contents as a base64 data: URL in gateway responses.
Impact
- Confidentiality impact: local file read in the gateway process context.
- Exfiltration path:
agents.listcan return the resultingavatarUrlpayload.
Affected Components
src/gateway/session-utils.ts(resolveIdentityAvatarUrl)
Affected Packages / Versions
- Package:
openclaw(npm) - Introduced:
v2026.1.21 - Affected published versions:
<= 2026.2.21-2 - Planned patched version:
2026.2.22
Remediation
- Resolve workspace and avatar paths with
realpathand enforce realpath containment. - Open files with
O_NOFOLLOWwhen available. - Compare pre-open and opened file identity (
dev/ino) to block swap races. - Add regression tests for outside-workspace symlink rejection and in-workspace symlink allowance.
Fix Commit(s)
3d0337504349954237d09e4d957df5cb844d5e77
OpenClaw thanks @aether-ai-agent for reporting.
Questions
- How does the file content leave the host?
The gateway embeds it as a base64 data URL in avatarUrl, which the agents.list call can return.
- Which versions are affected by GHSA-9mph-4f7v-fmvh?
From v2026.1.21 up to but not including 2026.2.22.
- Can an attacker write files with this?
No. The advisory describes a local file read only. Confidentiality impact is high and integrity impact is none.
- Is it exploited in the wild?
The advisory does not say so, and the entry has no CISA KEV data.
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
