Mar 9, 2026·6 min read·212 visits
Unauthenticated remote attackers can crash MongoDB servers by sending crafted OP_COMPRESSED messages that trigger excessive memory allocation, leading to OOM termination.
MongoDB Server versions prior to 8.2.4, 8.0.18, and 7.0.29 are vulnerable to a pre-authentication Denial of Service (DoS) attack. By sending crafted OP_COMPRESSED wire protocol messages with disproportionately large uncompressed size declarations, an unauthenticated remote attacker can force the server to allocate excessive memory, leading to resource exhaustion and process termination.
MongoDB Server utilizes a custom binary wire protocol for communication between clients and the database. This protocol defines various opcodes to instruct the server on how to process incoming messages. The OP_COMPRESSED opcode, designated by the integer value 2012, is utilized to encapsulate other opcodes within a compressed format. This encapsulation mechanism is designed to reduce network bandwidth usage by applying algorithms such as Snappy, Zlib, or Zstandard to the payload.
The vulnerability, identified as CVE-2026-25611, exists in the parsing logic responsible for handling these OP_COMPRESSED messages. The parsing occurs at the network ingress layer, before the server authenticates the client or processes any BSON payloads. Because this protocol layer is exposed to unauthenticated connections, the attack surface is accessible to any entity capable of routing TCP traffic to the MongoDB service port.
This flaw is classified under CWE-405: Asymmetric Resource Consumption (Amplification). The server fails to implement sufficient bounds checking on the memory allocation requests derived from client-provided packet fields. Consequently, an unauthenticated remote attacker can force the database process to allocate excessive amounts of memory with minimal network bandwidth expenditure, resulting in a severe Denial of Service condition.
The root cause of CVE-2026-25611 resides in the deterministic allocation of memory based entirely on untrusted client input. The structure of an OP_COMPRESSED message consists of a standard message header followed by four specific fields. These fields include the original opcode, the uncompressed size of the payload, the compressor ID, and the compressed payload itself. The standard message header specifies the total length of the packet, while the uncompressed size field dictates the expected size of the data after decompression.
Upon receiving an OP_COMPRESSED packet, the MongoDB ingress handler extracts the 32-bit integer representing the uncompressedSize. The server immediately provisions a memory buffer matching this exact size to store the output of the decompression algorithm. This allocation operation precedes any validation of the decompression process and occurs without correlating the declared uncompressed size against the actual size of the compressed payload.
The application implicitly trusts the client-provided size metric. If a malicious client supplies a mathematically disproportionate or physically unfeasible uncompressed size value, the server attempts the allocation regardless of the system's available resources. The lack of an upper bound or a sanity check on the ratio between compressed and uncompressed data sizes permits the asymmetric consumption of heap memory.
Exploitation of CVE-2026-25611 requires establishing a standard TCP connection to the target MongoDB service, which typically listens on port 27017. The attacker crafts a custom binary packet structured to match the OP_COMPRESSED wire protocol specification. The critical component of this payload is the uncompressedSize field, which the attacker populates with an artificially inflated value, such as 0x7FFFFFFF representing approximately 2.1 gigabytes.
The compressed payload section of the packet can contain minimal or arbitrary data, requiring only a few bytes of network transit. When the MongoDB server processes this packet, it requests a contiguous memory block of 2.1 gigabytes from the operating system allocator. A single request consumes a massive fraction of available system memory while costing the attacker practically zero bandwidth.
To guarantee process termination, the attacker transmits multiple crafted packets concurrently. This rapid sequence of multi-gigabyte allocation requests quickly exhausts the physical RAM and swap space of the host system. Once memory is fully depleted, the Linux kernel invokes the Out-Of-Memory (OOM) Killer, which subsequently identifies the MongoDB process as the primary memory consumer and terminates it. Alternatively, the memory allocator may throw an unhandled exception, causing the MongoDB process to crash directly.
The direct impact of this vulnerability is a complete loss of availability for the targeted MongoDB database instance. The National Vulnerability Database calculates a CVSS v4.0 base score of 8.7 and a CVSS v3.1 base score of 7.5, reflecting the high severity of the availability impact coupled with the low complexity of the network-based attack vector. The absence of an authentication requirement significantly elevates the risk profile, exposing any internet-facing instance to immediate disruption.
In production environments, the sudden termination of the primary database process initiates a cascade of failures across dependent applications and microservices. While replica sets may trigger an automatic failover sequence, the deterministic nature of the exploit allows an attacker to continuously target newly elected primary nodes. This continuous targeting prevents the cluster from maintaining a stable state and nullifies the availability benefits of standard high-availability architectures.
Current threat intelligence indicates that proof-of-concept methodologies are available within the security research community, elevating the probability of targeted exploitation. The Exploit Prediction Scoring System (EPSS) currently records a score of 0.0005, placing it in the 15.2nd percentile. The trivial nature of the exploit construction suggests a high probability of integration into automated denial-of-service scripts and botnet targeting arrays.
MongoDB engineers addressed the asymmetric memory consumption flaw through a series of structural patches applied across the network ingress subsystem. The primary fix, tracked under SERVER-116210, introduces strict global limits on the maximum buffer size permitted for ingress requests. This modification ensures that the server evaluates the uncompressedSize field against predefined, safe thresholds before initiating any memory allocation sequence.
Supplementary patches provide defense-in-depth measures against memory-related process termination. SERVER-116211 caps the total memory allocation permitted for specific network buffer tasks, preventing concurrent requests from aggregating memory consumption beyond a safe limit. Additionally, SERVER-116206 improves the exception handling routines within the message compressor modules, ensuring that failed allocation attempts result in a controlled connection termination rather than an unhandled process crash.
Administrators must upgrade affected instances to MongoDB Server versions 8.2.4, 8.0.18, or 7.0.29 immediately. In environments where patching is constrained by deployment schedules, network security controls provide the only effective mitigation. Restricting access to port 27017 via firewalls or Virtual Private Cloud (VPC) security groups ensures that only trusted, authenticated network segments can initiate connections to the database layer.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
MongoDB Server MongoDB Inc. | < 8.2.4 | 8.2.4 |
MongoDB Server MongoDB Inc. | < 8.0.18 | 8.0.18 |
MongoDB Server MongoDB Inc. | < 7.0.29 | 7.0.29 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-405 |
| Attack Vector | Network |
| CVSS v4.0 | 8.7 |
| CVSS v3.1 | 7.5 |
| Impact | Denial of Service (Availability) |
| Exploit Status | Proof of Concept (PoC) |
| Authentication Required | None |
The system does not properly restrict the amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.
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.
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.
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.
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.
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.
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.