CVE-2026-32846: OpenClaw is vulnerable to Path Traversal through path validation bypass
OpenClaw through 2026.3.23 has a path traversal flaw in media parsing. Crafted `MEDIA:` tokens bypass the path checks in isLikelyLocalPath() and isValidMedia(), so an attacker can make the gateway read files such as .env files, system files and SSH keys. The package data lists 2026.03.28 as patched.
Published Mar 26, 2026 · Updated Nov 5, 2026 · Analysis Oct 31, 2026
What an attacker can do
OpenClaw scans text for MEDIA: tokens and treats the path after them as media to attach. splitMediaFromOutput() is the shared entry point. Two checks failed. isLikelyLocalPath() accepted ../ and ~ as valid local prefixes. And isValidMedia() let any candidate that matched the file-extension pattern through when allowBareFilename was set, so a value like ../../.env skipped the main classifier.
The text can come from an untrusted source, such as a model reply shaped by a prompt injection or a message sent by an outsider. The CVSS vector shows network access, no privileges and no user interaction. The attacker steers the media token to a file path, and the contents are read and returned as media. The sandbox check assertLocalMediaAllowed() was not changed by the fix, so the weak point was the path classification before it.
The result is disclosure of secrets: environment files with API keys, SSH private keys and system files. There is no integrity or availability impact. Hosts that run OpenClaw next to credentials are the worry.
Who is affected
The npm package openclaw at 2026.3.23 and earlier. The vulnerable functions are isLikelyLocalPath() and isValidMedia() in the media parsing code.
Check your version:
npm ls openclawopenclaw
- Ecosystem
- npm
- Affected
- <= 2026.3.23
- Fixed in
- 2026.3.28
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.03.28, the patched version listed in the package data, or later.
npm install openclaw@latestThe fix is commit 4797bbc, from pull request 54642. A shared hasTraversalOrHomeDirPrefix() guard now rejects ../, .., ~ and embedded .. segments in both functions, and the allowBareFilename fallback no longer skips it. Rejected paths are dropped as invalid media lines. The sources list no workaround.
How to tell if you were hit
Search agent output, chat transcripts and gateway logs for MEDIA: tokens whose path contains .. or begins with ~, such as MEDIA:../../.env. Check whether any file outside the intended media directory was read or sent. If you find a hit, treat the credentials in that file as exposed and rotate them.
Beam records the file access and shell commands of agents on a developer machine, and its rules flag reads of files like .env and SSH keys.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
OpenClaw through 2026.3.23 (fixed in commit 4797bbc) contains a path traversal vulnerability in media parsing that allows attackers to read arbitrary files by bypassing path validation in the isLikelyLocalPath() and isValidMedia() functions. Attackers can exploit incomplete validation and the allowBareFilename bypass to reference files outside the intended application sandbox, resulting in disclosure of sensitive information including system files, environment files, and SSH keys.
Credited to zuhairhalawa.
Questions
- What files can an attacker read through CVE-2026-32846?
The advisory names system files, environment files and SSH keys. In practice, any file the OpenClaw process can read.
- Does it need authentication?
The CVSS vector shows no privileges and no user interaction. The attacker needs a way to get a crafted
MEDIA:token into text that OpenClaw parses.- Is it exploited in the wild?
No source reports it, and it is not in CISA's KEV catalog. The EPSS score is 0.0073.
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
