Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with read privileges
-
ExploitCraft aggregate with internal stage and batchSize 0
-
ExecutionTrigger use-after-free read of freed memory
-
ImpactReceive unrelated process data (or crash mongod)
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated session with read privileges (PR:L) on the target MongoDB Server; there is no unauthenticated path. The attacker must issue an aggregate command that specifically combines an internal aggregation stage with a cursor batch size of 0 - that exact option combination IS the triggering condition. Reliable data disclosure is further limited by timing (AT:P): the freed memory must be reused with other data before the server reads it, so leaked contents are non-deterministic and may instead manifest as a process crash. Limiting factors for defenders: valid credentials are mandatory, no user interaction of a victim is needed (UI:N), and the impact is bounded to confidentiality/availability of the mongod process rather than integrity or code execution. |
| Impact | This is a moderate-priority issue rather than an emergency. The vendor CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H) scores 6.0 (medium): network-reachable (AV:N) and low attack complexity (AC:L), but gated by two meaningful dampeners - the attacker must already hold valid credentials with read privileges (PR:L, so NOT unauthenticated) and a specific attack requirement must be met (AT:P), reflecting that the freed memory must be reused with meaningful data before it is read. No EPSS score, no CISA KEV listing, and no public exploit code are present in the provided data, so exploitation status is 'no public exploit identified at time of analysis' - all three signals point to this not being under active mass exploitation. The primary impact is confidentiality (VC:H: leakage of unrelated process memory into query results), with integrity and the vendor's availability metric both marked N. However, the description explicitly states the server process 'may also terminate unexpectedly,' which conflicts with the vendor's VA:N rating - this suggests a real but likely non-deterministic denial-of-service dimension that the official vector understates; verify availability impact with MongoDB. Net: a genuine information-disclosure bug worth patching in a normal maintenance cycle, elevated in multi-tenant deployments where low-privilege read users should not see other tenants' data, but not a high-urgency, internet-facing, unauthenticated threat. |
| Exploit ScenarioDerived | An authenticated user holding only read privileges issues an aggregate command that combines an internal aggregation stage with a cursor batch size of 0, triggering a use-after-free. The server reads from released memory that may have been reused, returning unrelated in-process data (potentially another tenant's or user's data) to the client, and under some memory states crashes the mongod process. No public exploit code is identified at time of analysis, and reliable disclosure is non-deterministic because it depends on memory reuse timing (AT:P). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Use-after-free in the MongoDB Server aggregation engine lets an authenticated user holding read privileges trigger disclosure of unrelated process memory - or, depending on heap state, an unexpected mongod termination - by issuing an aggregate command that combines an internal aggregation stage with a cursor batch size of 0. The vendor-assigned CVSS 4.0 score is 6.0 (CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N), while our independent CVSS 3.1 assessment rates it 6.x as AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:L, reflecting that exploitation demands valid credentials, the exact option combination, and a favourable memory-reuse window. There is no confirmed active exploitation (not in CISA KEV) and no public exploit code identified at time of analysis, so this is a moderate-priority hardening item rather than an emergency.
RemediationAI
No vendor-released patch or fixed version is identified at time of analysis - the sole reference is the MongoDB JIRA tracking issue SERVER-132946 (https://jira.mongodb.org/browse/SERVER-132946), and nothing in the supplied data confirms a patched release or an upstream PR/commit. Track that issue and apply the vendor's fixed build as soon as it is published. Until then, compensating controls, with trade-offs: (1) audit and, where feasible, reject or log aggregate commands that specify batchSize: 0, especially when paired with internal stages - this requires query-shape monitoring (for example via the profiler or database profiler settings) and will generate noise plus a small profiling overhead, and it only blocks the known trigger rather than the underlying bug; (2) enforce least privilege so read-capable accounts are granted only the namespaces they need, since the flaw requires PR:L and cannot be reached unauthenticated - this does not stop a legitimately privileged insider but removes broad read roles from service accounts; (3) isolate mongod with network controls and authentication (bind to internal interfaces, require TLS and SCRAM) so an attacker cannot first obtain the read session the bug requires - this has no effect on authenticated abusers but raises the bar for external ones; (4) accept the availability trade-off inherent in the bug: because the same trigger can abort the process, prefer replica sets or sharded clusters over single-node deployments, tune retryWrites/retryReads on clients, and ensure monitoring restarts mongod promptly - this reduces blast radius but does not prevent the crash or the memory disclosure itself.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The defect is a classic CWE-416 use-after-free inside MongoDB's aggregation framework. An aggregation pipeline mixes user-visible stages with internal stages that MongoDB itself injects during query planning and execution; when such an internal stage is executed alongside a cursor batch size of 0 (batchSize: 0), an internal document buffer is released while a later stage still holds a reference to it. The subsequent read returns whatever now occupies that heap region, so the client can receive bytes belonging to other queries or server-side structures - an information-disclosure primitive rather than a write primitive, and the attacker cannot choose or steer the leaked contents. Because reuse is not guaranteed, the same trigger may instead surface as an access violation that aborts the mongod process. The supplied CPE (cpe:2.3:a:mongodb:mongodb_server:*:*:*:*:*:*:*:*) is version-agnostic, so the affected build range is defined by the vendor JIRA issue SERVER-132946 rather than by the CPE string. The CVSS 4.0 vector's AT:P and our 3.1 AC:H both encode the same prerequisite: a non-deterministic memory-state window must be satisfied before the flaw yields observable data.
Know when MongoDB gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Authenticated read user gives PR:L; memory-reuse timing dependence maps to AC:H; disclosure of process memory is C:H; possible unexpected process termination justifies A:L; no integrity impact.
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
2DescriptionCVE.org
Use of freed memory in the aggregation feature of MongoDB Server can cause the server to read data from a memory area after it has been released. When an internal aggregation stage is combined with a batch size of 0, the server may read from memory that is no longer in use. Because that memory can be reused for other data before it is read, query results returned to the client may contain unrelated data from the server process. Depending on the state of memory at the time, the server process may also terminate unexpectedly. The behavior can occur when an authenticated user with read privileges runs an aggregate command that combines these two settings.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo
The find prototype in scripting/engine_v8.h in MongoDB 2.4.0 through 2.4.4 allows remote authenticated users to cause a
The MongoDB bson JavaScript module (also known as js-bson) versions 0.5.0 to 1.0.x before 1.0.5 is vulnerable to a Regul
Remote code execution in Chartbrew versions prior to 4.8.1 allows authenticated attackers with high privileges to execut
After user deletion in MongoDB Server the improper invalidation of authorization sessions allows an authenticated user's
The default configuration for MongoDB before 2.3.2 does not validate objects, which allows remote authenticated users to
SimStudio below 0.5.74 has a missing authorization on MongoDB tool endpoints that allows attackers to execute arbitrary
MongoDB Server may access non-initialized region of memory leading to unexpected behaviour when zero arguments are calle
MongoDB Compass may be susceptible to code injection due to insufficient sandbox protection settings with the usage of e
Under certain configurations of --tlsCAFile and tls.CAFile, MongoDB Server may skip peer certificate validation which ma
All versions of bson before 1.1.4 are vulnerable to Deserialization of Untrusted Data. Rated critical severity (CVSS 9.8
Memory corruption in the MongoDB BI Connector ODBC Driver (fixed in v1.4.9) occurs when an oversized catalog, schema, or
EUVD-2026-98811
GHSA-8hjj-9fm5-xw5g
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB