CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-W2CG-VXX6-5XJG

Death by Allocation: Crashing OpenClaw with Base64

Alon Barad
Alon Barad
Software Engineer

Feb 18, 2026·5 min read·59 visits

Executive Summary (TL;DR)

OpenClaw (and the clawdbot package) < 2026.2.14 creates full memory buffers for Base64 inputs before checking their size. An attacker can send a large payload to trigger an OOM crash (DoS).

A classic case of 'allocation before validation' in the OpenClaw chat platform allows attackers to crash the server via memory exhaustion. By sending massive Base64-encoded strings, an attacker can trick the application into allocating gigabytes of memory to decode or sanitize the input before checking if the file size is actually within limits. This results in a Node.js OutOfMemoryError and a hard crash of the service.

The Hook: Size Does Matter

In the world of web applications, handling file uploads is like handling a live grenade. You have to be gentle, precise, and most importantly, you need to know how big the explosion might be before you pull the pin.

OpenClaw, a chat platform that likely prides itself on slick communication, fell into a classic trap when handling media attachments. Specifically, the issue lies in how they calculate the size of Base64-encoded files. In a naive implementation, if you want to know how big a file is, you decode it and check the length. Simple, right?

Wrong. That logic is deadly in an event-driven, single-threaded environment like Node.js. If I tell the server, "Hey, I'm sending you a 2GB image encoded in Base64," and the server's response is, "Cool, let me load that entire 2GB into RAM real quick so I can check if it's allowed," you have a recipe for disaster. This vulnerability is exactly that: a polite request for the server to commit suicide by memory gluttony.

The Flaw: Allocation Before Validation

The root cause here is a failure to understand the cost of operations. The developers implemented a workflow that looks like this: Receive Input -> Clean Input -> Decode Input -> Check Size -> Error if too big.

The problem is that steps 2 and 3 require massive memory allocations. In the vulnerable versions of OpenClaw, the code utilized Buffer.from(b64, 'base64') to convert the incoming string into binary data. In Node.js, this operation allocates a new slab of memory outside the V8 heap (for large buffers) or inside it.

Even worse, there was logic to "estimate" the size that involved base64.trim().replace(/\s+/g, ""). Let's pause and appreciate the inefficiency here. If an attacker sends a 500MB string, .replace() creates another massive string in memory to hold the result. We are effectively doubling or tripling the memory footprint of the attack payload just to perform a check that says "Error: File too big." By the time the code realizes the file is too large, the process has already crashed with an OutOfMemoryError.

The Code: The Smoking Gun

Let's look at the crime scene. The vulnerable code blindly trusted the runtime to handle massive allocations. Here is the logic that kills the process:

// The expensive way to check size
const sizeBytes = Buffer.from(b64, "base64").byteLength;
if (sizeBytes > maxBytes) {
  throw new Error("exceeds size limit");
}

This is the equivalent of buying a car just to see if it fits in your garage. If it doesn't, you've already spent the money (memory). The fix, introduced in commit 31791233d60495725fa012745dde8d6ee69e9595, changes the paradigm. Instead of allocating, we do math.

The patched version iterates over the string to count valid Base64 characters, ignoring whitespace, without creating new strings or buffers:

// The smart way: O(1) memory, O(n) CPU
export function estimateBase64DecodedBytes(base64: string): number {
  let effectiveLen = 0;
  // Iterate, don't allocate
  for (let i = 0; i < base64.length; i += 1) {
    const code = base64.charCodeAt(i);
    if (code <= 0x20) continue; // Skip whitespace
    effectiveLen += 1;
  }
  // ... calculation formula ...
}

This function allows OpenClaw to reject a 10GB payload while only using a few bytes of stack memory for the loop counters.

The Exploit: DoS via JSON

Exploiting this does not require advanced binary wizardry. It requires curl and a lot of the letter 'A'. The attack vector is a standard HTTP POST request to the Gateway or Media endpoints.

An attacker constructs a JSON payload containing a Base64 field. They don't even need valid image data; they just need a valid Base64 string structure. Padding the string to a massive length (e.g., 1GB+) is sufficient.

# Conceptual Exploit Payload
payload=$(python3 -c "print('A' * 1000000000)")
 
curl -X POST https://target-openclaw-instance/api/media/upload \
  -H "Content-Type: application/json" \
  -d "{\"file\": \"$payload\", \"name\": \"doom.png\"}"

When the server parses this JSON and attempts to process the file field using the vulnerable logic, the Node.js event loop blocks while trying to allocate the buffer. When the allocation fails (or the garbage collector goes into a panic spiral), the process dies. If the service is orchestrated (e.g., Kubernetes), the pod will crash and restart. If an attacker loops this request, they can keep the service in a permanent state of crash-loop backoff.

The Mitigation: Patch or Block

The primary fix is to update openclaw or clawdbot to version 2026.2.14. This version includes the memory-efficient estimation logic and stricter regex validation (/^[A-Za-z0-9+/]+={0,2}$/) that rejects malformed payloads before expensive processing occurs.

If you cannot patch immediately, you must rely on infrastructure-level defenses. A Web Application Firewall (WAF) or a reverse proxy (Nginx) configured with client_max_body_size can stop these requests before they hit the Node.js application layer.

However, relies on Content-Length headers which can be spoofed or omitted in chunked encoding attacks, so application-level validation is always the only true fix.

Official Patches

OpenClawOfficial Fix Commit

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.04%
Top 100% most exploited

Affected Systems

OpenClaw GatewayOpenClaw Media Serverclawdbot (npm package)

Affected Versions Detail

Product
Affected Versions
Fixed Version
openclaw/openclaw
OpenClaw
< 2026.2.142026.2.14
clawdbot
OpenClaw
< 2026.2.142026.2.14
AttributeDetail
CWECWE-770 (Allocation of Resources Without Limits)
Attack VectorNetwork (API)
CVSS7.5 (High)
ImpactDenial of Service (DoS)
LanguageTypeScript / Node.js
Vulnerable FunctionBuffer.from() / String.replace()

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
T1499.003Application Exhaustion Flood
Impact
CWE-770
Allocation of Resources Without Limits or Throttling

Allocation of Resources Without Limits or Throttling

Known Exploits & Detection

HypotheticalSimple curl command sending >500MB JSON payload.

Vulnerability Timeline

Vulnerability Identified
2026-02-14
Patch Developed (Commit 3179123)
2026-02-14
Release v2026.2.14 Published
2026-02-14
GHSA-W2CG-VXX6-5XJG Published
2026-02-14

References & Sources

  • [1]GHSA Advisory

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 16 hours ago•CVE-2026-115895
8.8

CVE-2026-115895: Code Injection via Unsanitized Import Alias in Happy DOM ECMAScript Module Compiler

CVE-2026-115895 is a high-severity code injection vulnerability (CWE-94) in the happy-dom npm package prior to version 21.0.4. The vulnerability exists within the ECMAScriptModuleCompiler component, which transforms ECMAScript module syntax into executable Node.js functions when JavaScript evaluation is enabled. Due to an incomplete fix for CVE-2026-33943, the compiler failed to validate local named import aliases against legal JavaScript identifier rules. Attackers supplying crafted module imports—specifically utilizing destructuring default initializers alongside JSON module attributes—can inject arbitrary JavaScript expressions directly into the host Node.js runtime context.

Amit Schendel
Amit Schendel
7 views•10 min read
•about 17 hours ago•CVE-2026-115883
6.0

CVE-2026-115883: Cross-Namespace Access via Dot-Delimited Labels in LangGraph Postgres and SQLite Stores

An improper input validation and authorization bypass vulnerability exists in the LangGraph storage layer affecting langgraph, langgraph-checkpoint-postgres, and langgraph-checkpoint-sqlite. Because relational store implementations serialize namespace tuples into dot-delimited strings without validating labels on read, search, delete, and batch operations, an attacker who controls a namespace label can inject periods (.) to traverse namespace boundaries and access, modify, or delete data belonging to other namespaces.

Amit Schendel
Amit Schendel
8 views•9 min read
•about 18 hours ago•CVE-2026-115886
6.5

CVE-2026-115886: Unauthenticated Server-Side Request Forgery and Unsafe Reflection in MLflow Scorer Evaluation Endpoints

CVE-2026-115886 (GHSA-2wqp-q3c6-ccj5) is a Server-Side Request Forgery (SSRF) and Unsafe Reflection vulnerability in MLflow versions 3.12.0rc0 prior to 3.17.0. Unauthenticated REST API endpoints accept serialized third-party scorer JSON payloads that are dynamically deserialized and reflectively instantiated without sanitizing constructor keyword arguments. When optional dependencies such as trulens and trulens-providers-litellm are installed, attackers can inject egress-steering arguments into the scorer payload, forcing the MLflow server to dispatch outbound HTTP requests to arbitrary internal destinations or cloud metadata services.

Alon Barad
Alon Barad
9 views•10 min read
•about 19 hours ago•CVE-2026-113872
7.5

CVE-2026-113872: Unauthenticated Process Crash in Express Multer via Late Busboy Stream Resumption

CVE-2026-113872 (GHSA-q7qp-rjg7-q26m) is a high-severity denial-of-service vulnerability affecting the multer multipart/form-data upload middleware for Node.js and Express in versions 2.0.0 through 2.4.0. When an endpoint is configured to accept multiple files using an asynchronous fileFilter callback, a crafted, truncated multipart HTTP request can trigger an unhandled error event on the underlying busboy stream parser after request teardown has already completed. Because all error listeners are stripped during teardown, Node.js treats the resulting error event as an uncaught exception and immediately terminates the server process.

Amit Schendel
Amit Schendel
7 views•12 min read
•about 20 hours ago•CVE-2026-115897
2.1

CVE-2026-115897: Cross-Site Scripting via Function Body Boundary Bypass in serialize-javascript

CVE-2026-115897 (also tracked as GHSA-m5mm-p8h7-m29v and aliased as CVE-2026-115754) is a Cross-Site Scripting (XSS) vulnerability in the Yahoo serialize-javascript npm package prior to version 7.1.3. The flaw exists in the regular expression used by escapeFunctionBody() to neutralize HTML script closing tags within serialized JavaScript functions. Because function bodies are sanitized in isolation before structural formatting is applied, a function whose string representation terminates directly with the sequence '</script' bypasses the positive lookahead check. When combined with serialization formatting options that introduce whitespace delimiters and a subsequent property that supplies a closing bracket, an attacker can prematurely terminate an enclosing HTML <script> block and inject arbitrary HTML or JavaScript into the rendered document.

Amit Schendel
Amit Schendel
7 views•13 min read
•about 21 hours ago•CVE-2026-109841
5.9

CVE-2026-109841: Subresource Integrity Verification Bypass in Node.js Undici

CVE-2026-109841 is a Subresource Integrity (SRI) verification bypass vulnerability in undici, the official HTTP/1.1 and HTTP/2 client library for Node.js that powers the global fetch() implementation. The flaw stems from improper handling of case sensitivity (CWE-178) when validating cryptographic hash algorithm tokens within SRI metadata. Because undici compared incoming algorithm identifiers against a strictly lowercase set without prior ASCII-lowercase normalization, valid uppercase or mixed-case tokens such as SHA256- or Sha384- were treated as unrecognized algorithms and discarded. Under SRI forward-compatibility rules, discarding all provided tokens results in an empty integrity list, causing undici to fail open and accept tampered HTTP response bodies without cryptographic verification.

Alon Barad
Alon Barad
10 views•9 min read