GHSA-jq4x-98m3-ggq6: OpenClaw Canvas Path Traversal Information Disclosure Vulnerability
In OpenClaw before 2026.2.21, the gateway's `canvas` tool read any file named in the `jsonlPath` parameter of the `a2ui_push` action and sent the contents to a connected node. Someone holding a gateway token, or a prompt injection steering an agent that holds one, can read SSH keys, cloud credentials and the gateway token. Fixed in 2026.2.21.
Published Mar 2, 2026 · Analysis Oct 31, 2026
What an attacker can do
The a2ui_push handler in src/agents/tools/canvas-tool.ts passes jsonlPath to fs.readFile() after only a .trim(). There is no directory allowlist, no path.resolve or realpath, no check for .. and no .jsonl extension requirement. The file contents are forwarded to the connected node client with the canvas.a2ui.pushJSONL WebSocket command, and the HTTP caller just gets { ok: true }.
A caller needs a valid gateway token to reach POST /tools/invoke. The report's primary scenario is prompt injection: AI agents hold the gateway token, so hostile text in content an agent processes can make it call the canvas tool with a path such as ~/.ssh/id_rsa, ~/.aws/credentials or openclaw.json, which holds the gateway token. If an attacker controls or impersonates the connected node, the file arrives there. The proof of concept in the report read /etc/passwd and showed it in the node's log. Only reading is possible, which matches the confidentiality-only score.
Who is affected
The openclaw npm package below 2026.2.21. The reporter tested 2026.2.17 on macOS. Any gateway that exposes /tools/invoke with the canvas tool and a connected node is in scope. Check your version:
npm ls -g openclaw
openclaw --versionopenclaw
- Ecosystem
- npm
- Affected
- < 2026.2.21
- Fixed in
- 2026.2.21
- Check
npm ls openclaw
How to fix it
Upgrade to openclaw 2026.2.21.
npm install -g [email protected]The fix commit is 39816e61b0c4347a83c9b76bc8883190cfe5a3c9. The advisory text gives no workaround. Until you upgrade, keep the gateway token out of reach of agents that process untrusted content, restrict who can reach the gateway, and rotate any credential on a host where the gateway ran.
How to tell if you were hit
Search gateway logs for POST /tools/invoke calls with "tool":"canvas", "action":"a2ui_push" and a jsonlPath value, particularly one outside the normal canvas directories or pointing at dotfiles, /etc or credential paths. On the node side, canvas.a2ui.pushJSONL messages that carry non-JSONL content such as passwd lines or private keys indicate a hit. Beam records agent MCP and tool calls and file access, so a prompt-injected canvas call that reads a credential file would show in its records and its rules can flag it.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
ZDI-CAN-29312: OpenClaw Canvas Path Traversal Information Disclosure Vulnerability
-- ABSTRACT -------------------------------------
Trend Micro's Zero Day Initiative has identified a vulnerability affecting the following products: OpenClaw - OpenClaw
-- VULNERABILITY DETAILS ------------------------
- Version tested: openclaw 2026.2.17
- Platform tested: macOS 26.3
---
Analysis
Description
The OpenClaw gateway's canvas tool accepts an a2ui_push action with a jsonlPath parameter that specifies a filesystem path to read. The gateway reads this file using fs.readFile() with no path validation, canonicalization, or directory restriction. An authenticated attacker can supply an arbitrary absolute or relative path to read any file accessible to the gateway process.
The file contents are forwarded to the connected node client via the canvas.a2ui.pushJSONL WebSocket command. The gateway itself returns { ok: true } to the HTTP caller, confirming the file was read and transmitted.
Root Cause
In src/agents/tools/canvas-tool.ts, the a2ui_push action handler reads a file from disk without any path restrictions:
case "a2ui_push": {
const jsonl =
typeof params.jsonl === "string" && params.jsonl.trim()
? params.jsonl
: typeof params.jsonlPath === "string" && params.jsonlPath.trim()
? await fs.readFile(params.jsonlPath.trim(), "utf8") // <-- NO PATH VALIDATION
: "";
if (!jsonl.trim()) {
throw new Error("jsonl or jsonlPath required");
}
await invoke("canvas.a2ui.pushJSONL", { jsonl });
return jsonResult({ ok: true });
}The jsonlPath parameter is passed directly to fs.readFile() after only a .trim() call. There is:
- No allowlist of permitted directories
- No canonicalization (
path.resolve/realpath) - No check against directory traversal sequences (
..) - No restriction to
.jsonlfile extensions
Attack Scenario
Prompt Injection (Primary)
OpenClaw is an AI agent orchestration tool. AI agents hold the gateway token to invoke tools. A prompt injection attack ��� where malicious instructions are embedded in content the AI processes ��� can direct the agent to call:
POST /tools/invoke
Authorization: Bearer <agent's token>
Content-Type: application/json
{
"tool": "canvas",
"args": {
"action": "a2ui_push",
"jsonlPath": "/etc/passwd",
"node": "node-host"
}
}The gateway reads /etc/passwd (or any file: ~/.ssh/id_rsa, ~/.aws/credentials, openclaw.json containing the gateway token itself) and can forward the contents to an attacker connected node.
Reproduction Steps
Prerequisites
- Docker installed
- Python 3
- OpenClaw Docker image built as
openclaw:local
Steps
- Navigate to the PoC directory and start the environment: ``
bash cd vulnerabilities/01-canvas-a2ui-push-lfi docker compose up -d --wait``
- This starts two containers:
- Gateway (
openclaw-vuln-01-gateway): Token-protected OpenClaw gateway on port 18701 - Node (
openclaw-vuln-01-node): WebSocket node client that logs received data (simulates exfiltration)
- Wait a few seconds for the node to authenticate, then run the PoC: ``
bash python3 poc.py``
- The PoC runs three tests:
| Test | Description | Result | | 1 ��� No auth | POST /tools/invoke without token | **401 Unauthorized** | | 2 ��� Exploit | POST /tools/invoke with token, `jsonlPath=/etc/passwd` | **200 OK** (file read) | | 3 ��� Exfiltration | Check node container logs for received file contents | **/etc/passwd contents visible** |
- Test 2 sends:
{"tool":"canvas","args":{"action":"a2ui_push","jsonlPath":"/etc/passwd","node":"node-host"}}. The gateway reads/etc/passwdviafs.readFile()and forwards the contents to the node viacanvas.a2ui.pushJSONL. The node logs show the full exfiltrated file: ``[node] ====== EXFILTRATED FILE CONTENTS via a2ui.pushJSONL ====== root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin ... node:x:1000:1000::/home/node:/bin/bash``
- Cleanup: ``
bash docker compose down -v``
-- CREDIT --------------------------------------- This vulnerability was discovered by: Peter Girnus (@gothburz) and Project AESIR of TrendAI Zero Day Initiative
-- FURTHER DETAILS ------------------------------
Supporting files: ZDI-CAN-29312.zip
If supporting files were contained with this report they are provided within a password protected ZIP file. The password is the ZDI candidate number in the form: ZDI-CAN-XXXX where XXXX is the ID number.
Please confirm receipt of this report. We expect all vendors to remediate ZDI vulnerabilities within 120 days of the reported date. If you are ready to release a patch at any point leading up to the deadline, please coordinate with us so that we may release our advisory detailing the issue. If the 120-day deadline is reached and no patch has been made available we will release a limited public advisory with our own mitigations, so that the public can protect themselves in the absence of a patch. Please keep us updated regarding the status of this issue and feel free to contact us at any time:
Zero Day Initiative [email protected]
The PGP key used for all ZDI vendor communications is available from:
http://www.zerodayinitiative.com/documents/disclosures-pgp-key.asc
-- INFORMATION ABOUT THE ZDI -------------------- Established by TippingPoint and acquired by Trend Micro, the Zero Day Initiative (ZDI) neither re-sells vulnerability details nor exploit code. Instead, upon notifying the affected product vendor, the ZDI provides its Trend Micro TippingPoint customers with zero day protection through its intrusion prevention technology. Explicit details regarding the specifics of the vulnerability are not exposed to any parties until an official vendor patch is publicly available.
Please contact Zero Day Initiative for further details or refer to:
http://www.zerodayinitiative.com
-- DISCLOSURE POLICY ----------------------------
Zero Day Initiative's vulnerability disclosure policy is available online at:
http://www.zerodayinitiative.com/advisories/disclosure_policy/
Fix Commit(s)
39816e61b0c4347a83c9b76bc8883190cfe5a3c9
Credited to zdi-disclosures.
Questions
- Does GHSA-jq4x-98m3-ggq6 work without a gateway token?
No. The report's test returned 401 without the token. The risk is that agents hold the token, so a prompt injection can make an agent issue the call.
- Which files can be read?
Any file the gateway process can read. The report names /etc/passwd, SSH private keys, AWS credentials and openclaw.json, which contains the gateway token.
- Which OpenClaw version fixes it?
2026.2.21. Versions below that are affected; the reporter tested 2026.2.17.
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
