GHSA-f6pf-4gjx-c94r: OpenClaw: Media Parsing Path Traversal Leads to Arbitrary File Read
OpenClaw up to 2026.3.24 approved `MEDIA:` references with parent-directory traversal or home-directory prefixes in its media parse layer. Text such as `MEDIA:../../etc/passwd` or `MEDIA:~/.ssh/id_rsa` could lead to an arbitrary file read. Fixed in 2026.3.28.
Published Apr 3, 2026 · Analysis Oct 30, 2026
What an attacker can do
OpenClaw lets model output refer to files with a MEDIA: line, which the media layer turns into an attachment. In src/media/parse.ts the approval check accepted a bare filename pattern as valid media, so inputs like ../../.env passed because they matched the file-extension pattern. Paths starting with ~ were accepted as well.
A model, or whoever controls the model's output through prompt injection or a poisoned document, can write such a line. The agent then reads the named file and delivers it as media to the chat or channel. Candidates include SSH keys, .env files, cloud credentials and system files. The CVSS vector is network, low privileges, no user interaction, with high confidentiality impact only.
The code comments indicate sandbox and allowed-directory enforcement happens later, in the load layer. The advisory does not say how far that stopped the read in each configuration, so treat any exposed host file as at risk.
Who is affected
The npm package openclaw, versions 2026.3.24 and earlier. Check the version:
npm ls openclaw
openclaw --versionAny deployment where model output can reach the media parser, which includes agents that handle untrusted web or chat content, is exposed.
openclaw
- Ecosystem
- npm
- Affected
- <= 2026.3.24
- Fixed in
- 2026.3.28
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.3.28 or later; v2026.3.28 is the first stable tag with the fix.
npm install -g [email protected]The fix commit rejects paths starting with ../, equal to .., starting with ~, or containing a .. segment, in isValidMedia() and the rewritten isLikelyLocalPath(). Such MEDIA: lines are also stripped from the output text. The sources list no workaround.
How to tell if you were hit
Search agent output and chat logs for MEDIA: lines that contain .. segments or begin with ~. Check media attachments delivered to channels for files that look like keys, .env content or system files. Beam records the file access of an agent, and its rules can flag reads of credential files such as SSH keys.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
OpenClaw <= 2026.3.24 Media Parsing Path Traversal to Arbitrary File Read
Affected Packages / Versions
- Package:
openclaw(npm) - Latest published npm version:
2026.3.31 - Vulnerable version range:
<=2026.3.24 - Patched versions:
>= 2026.3.28 - First stable tag containing the fix:
v2026.3.28
Fix Commit(s)
4797bbc5b96e2cca5532e43b58915c051746fe37— 2026-03-25T13:35:16-06:00
Release Process Note
- The fix is already present in released version
2026.3.28.
Credited to wsparks-vc, iskindar.
Questions
- Which OpenClaw version fixes the media parsing path traversal?
2026.3.28. Versions up to and including 2026.3.24 are affected. The fix commit is 4797bbc.
- What input triggers it?
A
MEDIA:line in model output with a traversal or home-directory path, such asMEDIA:../../../etc/passwdorMEDIA:~/.ssh/id_rsa. The fix rejects and strips these.- Is there a CVE?
This entry has only the GitHub advisory id GHSA-f6pf-4gjx-c94r. No CVE id appears in the advisory 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
