GHSA-57gh-m6rq-54cf: OpenClaw: Self-Whitelisting in appendLocalMediaParentRoots Allows Arbitrary File Read & Credential Exfiltration
In OpenClaw up to 2026.3.28, a media source path chosen by the model could add its own parent directory to the allowed local media roots. A model steered by prompt injection could read arbitrary host files and send them out. It only applies when the config already allows tool-fs root expansion. Fixed in 2026.3.31.
Published Apr 3, 2026 · Analysis Oct 30, 2026
What an attacker can do
Media tools in OpenClaw may only read files under approved local roots. In src/media/local-roots.ts, appendLocalMediaParentRoots took the paths given as media sources and added their parent directories to that approved set. The model chooses those paths, so it whitelisted its own targets. Pointing a media tool at a file in, say, a Pictures or home subfolder made that whole folder readable.
The model can then read files such as credentials, tokens or keys in the folders it picked, and return or send the contents. This turns a prompt-injected agent, or a malicious web page or document it processed, into a file reader and exfiltration channel.
The maintainers rate it medium and call it narrow, because the widening only happened after configuration already permitted tool-fs root expansion, meaning workspace-only was turned off. The default configuration is not the target. The CVSS vector is local with user interaction.
Who is affected
The npm package openclaw, versions 2026.3.28 and earlier, with a configuration that permits tool filesystem root expansion, which is when workspace-only is disabled. Check the version:
npm ls openclaw
openclaw --versionReview your configuration for settings that disable workspace-only filesystem access for agents.
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 fix.
npm install -g [email protected]The fix commit makes local media roots come only from configuration. Media source paths no longer widen the allowed roots. The allowed roots are the state directory media paths and workspace paths, plus the agent's workspace, and the filesystem root is never included. appendLocalMediaParentRoots is kept only for plugin compatibility. The sources list no workaround beyond keeping workspace-only enabled.
How to tell if you were hit
Review agent logs for media tool calls that read files outside the workspace, in directories like home folders, .ssh, .aws or application data. Look for outbound messages or uploads that carry files an agent should not have touched. Beam records the file access of an agent, and its rules can flag reads of credential files or paths outside the project.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
Media Local Roots Self-Whitelisting in appendLocalMediaParentRoots Allows Model-Initiated Arbitrary Host File Read and Credential Exfiltration
Current Maintainer Triage
- Status: narrow
- Normalized severity: medium
- Assessment: v2026.3.28 still self-whitelists media parent dirs in src/media/local-roots.ts, but only after config already permits tool-fs root expansion, so the impact is narrower than the default-critical framing.
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)
1ca4261d7e055d0be141ed79ebb1365d0fbc7364— 2026-03-30T17:15:03+01:00
OpenClaw thanks @tdjackey for reporting.
Credited to tdjackey.
Questions
- Which OpenClaw version fixes the media roots self-whitelisting?
2026.3.31. Versions up to and including 2026.3.28 are affected. The fix commit is 1ca4261.
- Is the default configuration affected?
The maintainers say the widening only happens after configuration already permits tool-fs root expansion, so the impact is narrower than the default-critical framing.
- Is there a CVE for this?
This entry has only a GitHub advisory id, GHSA-57gh-m6rq-54cf, and no CVE id 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
