NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

GHSA-f6pf-4gjx-c94r: OpenClaw: Media Parsing Path Traversal Leads to Arbitrary File Read

highCVSS 4.0 7.1

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 --version

Any 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 as MEDIA:../../../etc/passwd or MEDIA:~/.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 entries