AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-31990: OpenClaw: stageSandboxMedia destination symlink traversal can overwrite files outside sandbox workspace

highCVSS 4.0 7.7GHSA-cfvj-7rx7-fc7c

OpenClaw 2026.3.1 and earlier can overwrite files outside its sandbox workspace. When stageSandboxMedia copies inbound files into media/inbound, it follows a symlink already sitting at the destination path. Fixed in OpenClaw 2026.3.2. The advisory rates it moderate and does not say how the symlink gets planted.

Published Mar 3, 2026 · Updated Mar 19, 2026 · Analysis Nov 7, 2026

What an attacker can do

stageSandboxMedia validated source paths but wrote destination files with a direct copy path. That path did not enforce the destination boundary or check for aliases. When an inbound file was staged into media/inbound, a symlink that already existed in the destination path was followed during the write. The write then landed on a host file outside the sandbox workspace and overwrote it. The weakness is CWE-59.

The precondition is a symlink at a destination path under media/inbound. The advisory is silent on how an attacker would create it, so that step is unspecified. In an agent setup, the question is whether anything the agent or a sandboxed process does can create links in the media directory.

The consequence is a sandbox escape for writes: a staged attachment can replace a host file the OpenClaw process can write. That breaks the isolation that the sandbox is meant to give.

Who is affected

The npm package openclaw at 2026.3.1 and earlier. Check the installed version.

npm ls openclaw

The advisory checked 2026.3.1 as the latest affected release. Setups that stage inbound media into a sandbox workspace are the relevant ones.

openclaw

Ecosystem
npm
Affected
<= 2026.3.1
Fixed in
2026.3.2
Check
npm ls openclaw

How to fix it

Upgrade to OpenClaw 2026.3.2 or later.

npm install -g [email protected]

The fix is commit 17ede52a. Staging writes, for both local and SCP-staged attachments, now go through root-scoped safe write primitives that block destination symlink escapes. The advisory lists no workaround.

How to tell if you were hit

Search the sandbox workspace for symlinks under media/inbound.

find media/inbound -type l

Any link there that points outside the workspace is suspect. Check host files the OpenClaw user can write for unexpected modification times or contents that match recently received attachments. Beam records agent shell commands and file access, so link creation by an agent in that directory would be in its record.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

stageSandboxMedia allowed destination symlink traversal during media staging, which could overwrite files outside the sandbox workspace root.

Impact

When sandbox media staging handled inbound files, destination writes under media/inbound were not destination-alias-safe. If a symlink existed in that destination path, the write could follow it and overwrite host files outside the intended sandbox workspace boundary.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Latest published version checked: 2026.3.1
  • Affected: <= 2026.3.1
  • Patched versions: >= 2026.3.2 (released)

Root Cause

stageSandboxMedia validated source paths but wrote destination files with a direct copy path that did not enforce destination boundary/alias checks.

Remediation

The fix routes staging writes through root-scoped safe write primitives for both local and SCP-staged attachments, preventing destination symlink traversal escapes.

Fix Commit(s)

  • 17ede52a4be3034f6ec4b883ac6b81ad0101558a

Credited to tdjackey.

Questions

Which OpenClaw version fixes this symlink issue?

2026.3.2. Releases up to 2026.3.1 are affected.

Does it have a CVE id?

The GitHub advisory GHSA-cfvj-7rx7-fc7c lists none, but this entry is tracked here as CVE-2026-31990.

Can an outsider exploit it directly?

Only if a symlink exists at the destination path. The advisory does not say how one is created, so it is not a one-step remote attack.

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