Mar 3, 2026·5 min read·32 visits
OpenClaw extensions download full media files into RAM before checking size limits. Attackers can crash the service by sending large files (DoS). Fixed versions enforce limits during the download stream.
OpenClaw, an open-source personal AI assistant framework, contains a Denial of Service (DoS) vulnerability in multiple messaging channel extensions (including Discord, Telegram, and Microsoft Teams). The vulnerability arises from improper handling of inbound media attachments, where the application buffers the entire content of a remote file into memory before verifying its size against configured limits. This 'sink-then-check' behavior allows remote attackers to trigger an Out-of-Memory (OOM) exception and crash the Node.js process by sending a sufficiently large file or a continuous data stream.
OpenClaw integrates with various messaging platforms (Discord, Telegram, Zalo, Microsoft Teams, BlueBubbles) to process user interactions. These integrations necessitate handling rich media, such as images, videos, and documents, sent by users. The vulnerability exists within the media ingestion logic of these extensions.
Technically, this is a Resource Exhaustion flaw categorized under CWE-770 (Allocation of Resources Without Limits or Throttling) and CWE-400 (Uncontrolled Resource Consumption). The affected components fail to implement defensive programming practices when handling untrusted input streams from remote servers. By accepting the full payload before validation, the application exposes itself to trivial denial-of-service attacks that consume all available heap memory, leading to an immediate process termination by the Node.js runtime.
The root cause is a distinct anti-pattern in asynchronous I/O handling known as "sink-then-check." In the vulnerable implementation, the extensions utilize high-level HTTP client methods that resolve the entire response body into a generic buffer object (e.g., ArrayBuffer or Node.js Buffer) before passing control back to the application logic.
The specific failure occurs because the check for maxBytes (the configuration setting intended to limit file sizes) is executed after the await keyword has already resolved the full promise chain for the download. In Node.js, this means the V8 engine must allocate contiguous memory on the heap to store the incoming binary data. If the remote resource exceeds the V8 heap limit (typically 2GB-4GB depending on flags), the allocation fails, and the process crashes ungracefully. This occurs regardless of whether the application code intends to reject the file effectively immediately afterward.
The vulnerability is evident in the handling of the fetch response. The patch introduces a centralized utility that manages the stream directly.
Vulnerable Pattern (Before Fix):
The code blindly allocates a buffer for the entire response. Note that res.arrayBuffer() reads the full stream into memory.
// Vulnerable logic in extension handlers
const res = await fetch(url);
// CRITICAL: The entire file is loaded into RAM here
const buf = new Uint8Array(await res.arrayBuffer());
const maxBytes = opts.maxBytes || DEFAULT_LIMIT;
// The check happens too late; memory is already exhausted
if (buf.byteLength > maxBytes) {
throw new Error("Attachment too large");
}Patched Pattern (After Fix):
The fix, applied in commit 73d93dee64127a26f1acd09d0403b794cdeb4f5c, replaces the manual fetch logic with a runtime utility fetchRemoteMedia. This utility enforces limits at the chunk level or via Content-Length inspection before full allocation.
// Patched logic using centralized runtime utility
const fetched = await getMSTeamsRuntime().channel.media.fetchRemoteMedia({
url: candidate.url,
maxBytes: params.maxBytes, // Limit passed to the fetcher
fetchImpl: (input, init) => fetchWithAuthFallback({ ... }),
});
// The utility monitors the stream and aborts early if size > maxBytesExploitation of this vulnerability requires network access to one of the messaging platforms where the target OpenClaw instance is active. No special tools are required; standard messaging clients suffice.
Attack Scenario:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory.This vector can be automated to continuously crash the bot whenever it restarts, resulting in a persistent denial of service.
The primary impact is Availability. The vulnerability allows for a reliable, low-cost Denial of Service attack. Because OpenClaw is often deployed as a single Node.js process, a crash in an extension handler brings down the entire assistant, including unrelated processing threads or context management.
CVSS v3.1 Metrics:
There is no impact on Confidentiality or Integrity, as the memory exhaustion occurs before the application processes or stores the malicious data.
Users running OpenClaw with any of the affected messaging extensions should upgrade immediately. The fix is implemented in the core logic and extension handlers to use the streaming fetch utility.
Remediation Steps:
openclaw package to the latest version via npm update openclaw or yarn upgrade openclaw.fetchRemoteMedia utility provided by the PluginRuntime rather than raw fetch calls for handling user-provided URLs.maxBytes is configured in the bot settings to a reasonable limit (e.g., 5MB or 10MB) to prevent resource waste even with the patch applied.Workarounds: If an immediate update is not possible, users can mitigate the risk by disabling media processing capabilities in their bot configuration or restricting the bot to trusted, private channels where malicious payloads are unlikely.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
openclaw openclaw | < 2026-02-21 | commit 73d93dee64127a26f1acd09d0403b794cdeb4f5c |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-770 |
| Attack Vector | Network |
| CVSS Score | 6.5 (Medium) |
| Impact | Denial of Service (OOM) |
| Platform | Node.js |
| Exploit Status | PoC Available |
Allocation of Resources Without Limits or Throttling
Grav CMS prior to version 1.7.53 and 2.0.0-rc.8 is vulnerable to an unauthenticated remote denial of service (DoS) vulnerability. By supplying crafted query parameters with extremely large dimensions to image assets, remote unauthenticated attackers can force the server to allocate massive amounts of system memory, leading to kernel Out-Of-Memory (OOM) termination of web worker processes.
CVE-2026-53657 is a local privilege escalation vulnerability in Lima (lima-vm/lima) affecting versions prior to 2.1.3 when configured with the QEMU driver. The guest agent daemon, running as root, creates its communication socket `/run/lima-guestagent.sock` with world-writable permissions (0777). This allows unprivileged local users to command the agent to establish arbitrary tunnels, including to privileged local UNIX sockets (like D-Bus). Because the target daemon authenticates the incoming connection using the credentials of the root-owned guest agent (via SO_PEERCRED), unprivileged users can perform root operations, resulting in complete guest VM compromise.
An unauthenticated Denial of Service vulnerability exists in the s2n-quic library's CryptoStream reassembler due to a lack of buffer limits on out-of-order cryptographic frames. An attacker can transmit a crafted CRYPTO frame with an extremely high offset and nominal payload, forcing the receiver to execute unbounded memory allocations and causing service crashes.
A JNDI Injection and Deserialization Gadget vulnerability exists in mchange-commons-java prior to version 0.6.0. The com.mchange.v2.naming.JavaBeanObjectFactory component permits arbitrary class instantiation and setter invocation, allowing attackers to perform Server-Side Request Forgery (SSRF) and remote class loading.
SurrealDB versions supporting element-level SELECT permissions on arrays are vulnerable to a logical authorization bypass. Due to an index-shifting error during array filtration, restricted elements can skip permission checks and leak to unauthorized record users.
CVE-2026-12243 is a path traversal vulnerability in the Natural Language Toolkit (NLTK) version 3.9.4. The flaw exists because the input validation routine fails to account for percent-encoded directory traversal sequences like '..%2f' before passing them to urllib.request.url2pathname(), which decodes them into active traversal sequences.