/

CVE-2026-26321

Severity:

HIGH RISK

(7.5)

Path Traversal / Arbitrary File Read in OpenClaw Feishu

CVE-2026-26321

Analyzed

Vulnerability type

Category:

Path Traversal / Arbitrary File Read

CWE:

CWE-22

Impact:

Local File Disclosure and Data Exfiltration

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The Feishu extension in OpenClaw prior to version 2026.2.14 allowed the sendMediaFeishu tool to interpret attacker-controlled mediaUrl values as local filesystem paths and read them directly.

If an attacker can influence tool calls, including via prompt injection, they may supply sensitive paths such as /etc/passwd and cause the assistant to exfiltrate local files to Feishu.

Affected context

This vulnerability affects OpenClaw deployments that:

  • Enable the Feishu integration and expose the sendMediaFeishu tool to workflows or user prompts
  • Run the assistant in an environment where the runtime has access to sensitive local files
  • Allow user-controlled or model-influenced values to flow into the mediaUrl parameter without strict validation

The issue is most concerning when the OpenClaw instance has access to configuration secrets, logs, SSH keys, or other confidential data on the local filesystem.

Exploit preconditions

  • Attack surface: The Feishu sendMediaFeishu tool interface exposed through OpenClaw (e.g., chat, automations, or other tools).
  • Required access: Ability to influence tool invocation parameters, either:
  • Directly (user explicitly sets mediaUrl), or
  • Indirectly (prompt injection or compromised upstream data causing the model to choose an attacker-controlled mediaUrl).
  • Trigger point: A call to sendMediaFeishu where mediaUrl is treated as a local filesystem path instead of a remote media URL.
  • Why exploitation is possible: The implementation trusted the mediaUrl value and passed it directly to local file reading APIs without enforcing a whitelist of schemes, path restrictions, or confinement to a safe directory, enabling classic path traversal and arbitrary file read behavior.

Why this happens

The root cause is an insecure handling of path input coming from a potentially untrusted source, mapping to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Instead of validating that mediaUrl referred only to legitimate external media resources (e.g., HTTPS URLs) or restricting it to a dedicated media directory, the extension allowed arbitrary strings to be interpreted as paths on the local filesystem.

This design conflated "reference to media" with "path to file", failed to enforce a local root or scheme restrictions, and thus exposed sensitive files that the process could read.

Potential impact

  • Disclosure of sensitive system files (e.g., /etc/passwd, configuration files, logs).
  • Exposure of application secrets such as API keys, database passwords, and OAuth tokens stored on disk.
  • Leakage of private user data, including local documents or cached content accessible to the OpenClaw runtime.
  • Facilitation of further attacks (lateral movement, account takeover) by exfiltrating credentials or internal configuration.
  • Loss of confidentiality and potential regulatory or contractual violations due to data exfiltration via Feishu.

General mitigation guidance

Mitigation generally centers on strictly separating URL-like references from local file paths and minimizing what the assistant process can read:

  • Enforce allowed schemes and patterns for mediaUrl (e.g., only https:// or other approved remote protocols) and reject values that look like absolute or relative filesystem paths.
  • Introduce a hardened media-loading layer that:
  • Confines local file access (if needed at all) to a dedicated, non-sensitive directory.
  • Implements canonicalization and checks that the resolved path stays under an allowed root.
  • Normalizes and rejects paths containing traversal sequences (.., symbolic links to sensitive areas, etc.).
  • Apply principle of least privilege to the OpenClaw runtime:
  • Run with minimal filesystem permissions and avoid mounting secrets or sensitive directories unless strictly required.
  • Use OS-level sandboxing or containers to limit accessible paths.
  • Treat tool parameters as untrusted input, even when produced by the model, and validate them at the boundary of each extension.
  • For sensitive environments, consider policy layers that prevent AI tools from initiating outbound transfers of arbitrary local content without explicit human review.

How teams detect issues like this

Detection typically involves both code-centric and behavior-centric approaches:

  • Static analysis patterns:
  • Search for calls where user- or model-influenced strings are passed directly into filesystem APIs (e.g., open, fs.readFile, similar equivalents) under parameters like url, path, or filename.
  • Flag functions that accept something named url or mediaUrl but do not apply scheme checks, canonicalization, or root directory enforcement.
  • Look for path concatenation or direct interpolation without validation, especially in extensions that send data to external services.
  • Code review signals:
  • Any tool or plugin that can access the local filesystem and transmit content off the host (e.g., via HTTP, chat APIs, or messaging integrations).
  • Mixed responsibilities where a "URL" parameter is sometimes treated as a remote URL and sometimes as a local file path.
  • Absence of clear boundaries or wrappers around file access in the assistant's tool layer.
  • Operational monitoring:
  • Log and review all uses of tools that read local files and upload them externally; define alerts for unusual paths (e.g., /etc/, /home/, /var/log/).
  • Track anomalous file access patterns from the assistant process, especially reads of highly sensitive locations.
  • Organizations may also employ automated code review or SAST tools configured with custom rules targeting path traversal and arbitrary file read patterns in AI tool integrations.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/5b4121d6011a48c71e747e3c18197f180b872c5d
github.comgithub.com/openclaw/openclaw/releases/tag/v2026.2.14
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-8jpq-5h99-ff5r

Frequently asked

questions

Yes. Remote exploitation is possible if an attacker can influence the arguments passed to the sendMediaFeishu tool—either directly through user input or indirectly via prompt injection or compromised upstream data that the model incorporates into tool calls.

No direct OS-level access is required. The attack relies on the OpenClaw process itself having read access to local files; the attacker only needs a way to drive the assistant to call sendMediaFeishu with attacker-chosen mediaUrl values.

The safest pattern is to treat mediaUrl strictly as a reference to remote or pre-approved media, enforce a whitelist of protocols or storage backends, and ensure any local file reading (if absolutely necessary) goes through a constrained helper that enforces a fixed root directory, canonicalization, and strict validation.

Design tools under the assumption that all tool parameters are untrusted, even when generated by the model. Centralize file access behind hardened abstractions, apply least-privilege to the runtime and filesystem, enforce explicit policy checks before data is exfiltrated, and incorporate targeted code review and automated scanning for path traversal and arbitrary file read patterns in AI-related integrations.

Find out what's already
exploitable in your codebase.