OpenClaw versions <= 2026.2.9 construct transcript file paths using an unsanitized sessionId and also accept sessionFile paths without enforcing that they stay within the agent sessions directory.
A crafted sessionId and/or sessionFile (example: ../../etc/passwd) can cause path traversal when the gateway performs transcript file read/write operations.
Preconditions: an attacker must be able to authenticate to the gateway (gateway token/password). By default the gateway binds to loopback (local-only); configurations that expose the gateway widen the attack surface.
openclaw (npm)<= 2026.2.9>= 2026.2.12Fixed by validating session IDs (rejecting path separators / traversal sequences) and enforcing sessions-directory containment for session transcript file operations.
4199f9889f0c307b77096a229b9e085b8d856c26cab0abf52ac91e12ea7a0cf04fff315cf0c94d64Upgrade to openclaw >= 2026.2.12.
Thanks @akhmittra for reporting.
{
"severity": "HIGH",
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-18T00:57:30Z",
"nvd_published_at": "2026-03-05T22:16:23Z"
}