Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privilege database credentials
-
DeliveryInvoke $_internalJsEmit or crafted mapreduce map function
-
ExploitCorrupt JavaScript engine memory state
-
ExecutionExecute $where/$function/mapreduce reduce operation
-
PersistTrigger use-after-free condition
-
ImpactCrash mongod process (DoS)
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 authenticated access with privileges to execute server-side JavaScript operations (typically readWrite or dbAdmin roles minimum). Exploitation depends on MongoDB Server running with server-side JavaScript engine enabled (security.javascriptEnabled=true, which is the default configuration). The attacker must have permission to invoke either mapreduce commands or access internal JavaScript functions like $_internalJsEmit. Critical limitation: successful exploitation requires precise sequencing of two JavaScript operations in a specific manner - first the memory-corrupting invocation ($_internalJsEmit or mapreduce map function), then the triggering operation ($where, $function, or mapreduce reduce) with exact timing to access freed memory. This sequencing complexity and the requirement for authenticated access with JavaScript execution privileges significantly limit exploitation surface compared to unauthenticated remote vulnerabilities. Default MongoDB deployments are vulnerable, but exploitation requires compromised credentials or malicious insider access. |
| Impact | Real-world risk assessment reveals moderate practical threat despite high CVSS 7.7 score. CVSS vector CVSS:4.0/AV:N/AC:H/AT:P/PR:L indicates network-accessible attack but with high complexity (AC:H), specific attack requirements (AT:P), and mandatory low-privilege authentication (PR:L). The EPSS score of 0.05% (16th percentile) suggests security researchers and attackers have not prioritized this vulnerability, likely due to exploitation complexity. Not present in CISA KEV, confirming no observed active exploitation. The use-after-free requires precise sequencing: first invoking internal JavaScript functions ($_internalJsEmit or mapreduce map) in a specific way, then triggering subsequent JavaScript operations with exact timing to exploit the freed memory. This multi-step requirement with precise ordering significantly raises the exploitation bar. SSVC decision framework assessment: exploitation status is none (no public POC), not automatable due to authentication requirement and complex chaining, technical impact is partial (DoS only, not confidentiality/integrity compromise per vector VC:H/VI:H/VA:H but SA:N restricts subsequent availability). Priority is medium - patch promptly but not emergency-level. Primary risk is authenticated malicious insiders or compromised application credentials enabling targeted denial-of-service against database availability. |
| Exploit ScenarioDerived | An authenticated attacker with low-level database privileges establishes a connection to MongoDB Server and first invokes $_internalJsEmit or constructs a mapreduce command with a specially crafted map function that primes the JavaScript engine's memory state. Subsequently, the attacker issues a second operation using $where clause, $function aggregation expression, or mapreduce reduce stage that references the freed memory region, triggering a use-after-free condition. The mongod process crashes immediately, causing denial-of-service for all database users. The attacker can repeat this sequence to maintain persistent unavailability, though each crash requires re-authentication after the service restarts. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – May 13, 2026
Authenticated users can crash MongoDB Server by chaining specific server-side JavaScript operations ($_internalJsEmit or mapreduce map functions) with subsequent JavaScript engine invocations ($where, $function, mapreduce reduce stages), triggering a use-after-free condition. Affects MongoDB Server 7.0 (prior to 7.0.34), 8.0 (prior to 8.0.23), 8.2 (prior to 8.2.9), and 8.3 (prior to 8.3.2). Vendor-released patches available for all affected branches. No public exploit identified at time of analysis; EPSS score of 0.05% (16th percentile) suggests low observed exploitation probability despite 7.7 CVSS score. The CWE-416 use-after-free root cause requires precise sequencing of JavaScript operations, limiting exploitability.
Earlier versions of this analysis (1)
Use-after-free memory corruption in MongoDB Server's server-side JavaScript engine allows authenticated attackers with low privileges to crash mongod instances via specific sequences involving $_internalJsEmit or mapreduce map functions followed by subsequent JavaScript operations ($where, $function, mapreduce reduce). CISA has not listed this as actively exploited (KEV status: absent), and no public exploit code is confirmed, indicating theoretical risk requiring specific operational knowledge of MongoDB's internal JavaScript APIs.
RemediationAI
Upgrade to MongoDB Server 7.0.34, 8.0.23, 8.2.9, or 8.3.2 respectively based on your current version branch. MongoDB has released patches for all affected versions as documented in Jira issue SERVER-121610 (https://jira.mongodb.org/browse/SERVER-121610). For environments where immediate patching is not feasible, disable server-side JavaScript execution as a compensating control by setting security.javascriptEnabled to false in mongod.conf, though this breaks legitimate functionality including $where queries, $function aggregation expressions, and mapreduce operations - assess application dependencies before implementing. Alternatively, restrict database user privileges to prevent access to mapreduce commands and $_internalJsEmit functions through role-based access control (RBAC), limiting the attack surface to only users requiring JavaScript operations. Monitor MongoDB logs for unusual JavaScript operation patterns or repeated mongod crashes as potential exploitation indicators. Note that disabling JavaScript has significant functional impact and should be temporary until patching completes.
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
This vulnerability involves MongoDB's server-side JavaScript execution engine, which enables operations like $where queries, $function aggregation expressions, and mapreduce commands. The issue stems from a use-after-free memory corruption (CWE-416) triggered when $_internalJsEmit (an internal function not intended for direct user access) or mapreduce map functions are invoked in a specific manner, followed by subsequent JavaScript engine operations. Use-after-free vulnerabilities occur when code references memory after it has been freed, leading to unpredictable behavior including crashes or potential code execution. MongoDB's JavaScript engine shares runtime state across operations, making proper memory lifecycle management critical. The CPE string (cpe:2.3:a:mongodb,_inc.:mongodb_server:*:*:*:*:*:*:*:*) confirms this affects the core MongoDB Server product across four major version branches (7.0, 8.0, 8.2, 8.3), indicating the vulnerability exists in shared JavaScript engine code spanning multiple releases.
Know when Mongodb Server 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:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/AU:N/R:A/V:D/RE:M/U:Red
Primary rating from Vendor (mongodb) · only source for this CVE.
CVSS VectorVendor: mongodb
Lifecycle Timeline
4DescriptionCVE.org
After invoking $_internalJsEmit, which is not intended to be directly accessible, or mapreduce command’s map function in a certain way, an authenticated user can subsequently crash mongod when the server-side JavaScript engine (through $where, $function, mapreduce reduce stage, etc.) is used also in a specific way, resulting in a post-authentication denial-of-service.
This issue impacts MongoDB Server v7.0 versions prior to 7.0.34, v8.0 versions prior to 8.0.23, v8.2 versions prior to 8.2.9 and v8.3 versions prior to 8.3.2.
Executive ViewAI
MongoDB Server versions 7.0 through 8.3 contain a use-after-free vulnerability in JavaScript execution that allows authenticated database users to crash the database service, potentially disrupting application availability. Organizations running affected MongoDB versions must prioritize patching to prevent denial-of-service incidents that could impact customer-facing services and data accessibility.
If immediate patching is not feasible, restrict database user permissions to disable $_internalJsEmit, mapreduce, $where, and $function operations via MongoDB role-based access controls; monitor JavaScript operation logs for suspicious chaining patterns; implement connection pooling with automatic reconnection to mitigate crash impact. Apply vendor patch as soon as operationally possible.
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.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
More in Mongodb Server
View allAuthorization bypass in MongoDB Server (7.0.x before 7.0.41, 8.0.x before 8.0.30, 8.3.x before 8.3.9) allows unauthentic
Credential exposure in MongoDB Server's replica-set/sharded-cluster internal authentication allows an adjacent-network a
Unauthenticated denial of service in MongoDB Server's aggregation framework allows remote attackers to crash the mongos
Unauthenticated CPU exhaustion in the MongoDB sharded-cluster router process (mongos) allows any client with network acc
Denial of service in MongoDB Server allows an unauthenticated remote attacker to terminate the mongod process by trigger
Out-of-bounds memory write in MongoDB Server's time-series collection feature enables arbitrary code execution by authen
MongoDB Server sharded clusters are vulnerable to use-after-free memory corruption when authenticated users with read pe
Remote unauthenticated denial-of-service in MongoDB Server's BSON validation layer allows attackers to crash the mongod
Pre-authentication denial-of-service in MongoDB Server allows unauthenticated remote clients to crash the database proce
Use-after-free in MongoDB Server's timeseries bucket lifecycle handling allows an authenticated user with write-level pr
Race condition in MongoDB Server's document value layer permits an authenticated user with ordinary read-write database
Incorrect authorization in MongoDB Server's LDAP integration allows an authenticated user to acquire elevated privileges
EUVD-2026-29893
GHSA-5f8r-h2c3-xvqc
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB