Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to MongoDB with low-privilege credentials
-
DeliveryInsert document with operator-shaped shard key value into sharded collection
-
ExploitDocument stored without sanitization or rejection by insertion validator
-
InstallChange stream consumer with updateLookup mode processes event for that document
-
C2Crafted shard key value embedded unsanitized into internal post-image lookup query
-
ExecuteQuery engine interprets value as operator expression instead of literal equality
-
ImpactConsumer receives wrong post-image document or crashes with non-resumable fatal error
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
|
| Exploitation Conditions | Exploitation requires three concurrent conditions: (1) the attacker must hold a valid MongoDB user credential with at minimum insert privileges on a sharded collection (PR:L - unauthenticated exploitation is not possible); (2) the MongoDB deployment must use sharding - a non-default topology requiring deliberate infrastructure provisioning, typically found in large-scale or horizontally-partitioned production environments; and (3) at least one application-layer change stream consumer must be configured with the updateLookup full document lookup option on the affected collection - this is an explicit application-level API configuration choice, not enabled by default. The CVSS 4.0 AT:P (attack requirements present) metric encodes these preconditions. Confidentiality impact is absent (VC:N): no data is exfiltrated to the attacker. The impacts are limited to data integrity (incorrect post-image documents delivered to consumers) and availability (non-resumable fatal errors breaking stream consumers). Non-sharded MongoDB deployments - including standalone instances and replica sets without sharding - are not affected by this vulnerability. |
| Impact | The CVSS 4.0 base score of 2.3 accurately reflects a limited-impact, precondition-gated vulnerability. The AT:P metric is decisive here - exploitation is gated on sharded collections being deployed and change streams being configured with updateLookup mode, both non-default architectural choices that require deliberate engineering decisions. The PR:L metric confirms that anonymous exploitation is not possible; a valid database credential is a hard prerequisite. Impact is bounded to VI:L and VA:L - consumers receive wrong documents or experience crash-level pipeline interruptions rather than full system compromise or confidentiality breach (VC:N). In practical terms, even a mid-sized municipal IT team in rybnik running MongoDB without sharding enabled would face zero exposure to this specific code path. For organizations that do operate sharded MongoDB clusters with real-time change stream pipelines, the risk is meaningful in a data-integrity sense: any authenticated application service account could inject crafted shard keys that silently corrupt downstream consumers' view of the data. The absence of a CISA KEV listing, absence of public exploit code, and low CVSS score collectively support treating this as a routine patch-cycle priority rather than an emergency response item, while acknowledging that the integrity guarantees of change stream pipelines are genuinely undermined until patched. |
| Exploit ScenarioDerived | An authenticated MongoDB user with insert privileges on a sharded collection constructs a document whose shard key field contains a MongoDB query operator object (for example, {$gt: ''}) instead of a scalar literal value. The document is accepted by the server despite insufficient shard key validation and is persisted in the sharded collection. Any application consuming a change stream on that collection with the updateLookup option enabled subsequently triggers the vulnerable post-image lookup path, causing the internal query to evaluate the crafted operator expression and return an unintended document to the consumer or raise a non-resumable fatal error that halts the change stream pipeline. No public proof-of-concept exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 08, 2026
Change stream data corruption in MongoDB Server (versions 7.0.0-7.0.40, 8.0.0-8.0.29, and 8.3.0-8.3.8) enables authenticated database users to insert documents with operator-shaped objects as shard key values that bypass insertion validation in sharded collections. When downstream change stream consumers operate in updateLookup full document mode, these stored values are embedded unsanitized into internal post-image lookup queries, causing MongoDB's query engine to interpret them as operator expressions rather than literal equality predicates. The practical result is that change stream consumers either receive incorrect post-image documents from unrelated records or encounter non-resumable fatal errors that break real-time data pipelines; no public exploit has been identified and vendor-released patches are available across all three affected release trains.
RemediationAI
Upgrade MongoDB Server to the vendor-released patched versions: 7.0.41 for the 7.0.x release train, 8.0.30 for the 8.0.x release train, or 8.3.9 for the 8.3.x release train, as applicable to the deployed environment. Patch availability is confirmed per the MongoDB vendor advisory tracked at https://jira.mongodb.org/browse/SERVER-131202. If immediate patching is not operationally feasible, a targeted compensating control is to suspend or reconfigure change stream consumers that use the updateLookup full document mode, replacing it with the default mode (which does not perform the vulnerable post-image lookup); this eliminates the exploitable code path at the cost of losing full post-update document content in change events. A secondary mitigation is to restrict insert privileges on sharded collections to only the most trusted, narrowly scoped service accounts, reducing the pool of principals who could introduce crafted shard key values, though this does not close the vulnerability and should not substitute for patching. Change stream consumers should also be instrumented to alert on non-resumable fatal errors, which could indicate attempted exploitation.
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
MongoDB's sharded cluster architecture uses a designated shard key field to route and locate documents across shards. CWE-943 (Improper Neutralization of Special Elements in Data Query Logic) captures the root cause: MongoDB's document-insertion validation path for sharded collections did not reject or sanitize shard key field values that contain MongoDB query operator structure - objects whose keys are '$'-prefixed operator names such as {$gt: ''} or {$in: []}. These operator-shaped values are persisted in the document alongside legitimate data. The vulnerability's triggering surface is the change stream updateLookup option, which instructs MongoDB to perform an additional internal query to fetch the full post-update document image for inclusion in the change event. That internal post-image query construction embeds the stored shard key value verbatim without escaping it as a data literal, so the query execution engine evaluates it as an operator expression, either matching unintended documents or raising fatal query errors. The affected software is identified by CPE cpe:2.3:a:mongodb:mongodb_server:*:*:*:*:*:*:*:* spanning three release trains: 7.0, 8.0, and 8.3.
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:N/VI:L/VA:L/SC:N/SI:N/SA:N
Network-reachable but requires authenticated low-privilege user (PR:L) and non-default sharding plus updateLookup preconditions (AC:H); no confidentiality impact (C:N).
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
2DescriptionCVE.org
In MongoDB, insufficient validation of shard key values during document insertion allowed authenticated users to store documents with specially crafted, operator-shaped objects as shard key values in sharded collections. When change stream events for such documents were processed with the updateLookup full document mode, the crafted values were embedded into internal post-image lookup queries without proper sanitization, causing them to be interpreted as query operators rather than literal equality values. This could result in change stream consumers receiving incorrect post-image documents or encountering non-resumable fatal errors.
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
NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.
MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo
Use-after-free in MongoDB Server's replication component can terminate replica set members unexpectedly and, under certa
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
Authenticated command injection in Dokploy before 0.31.1 lets any user who can update a MySQL, PostgreSQL, MariaDB, Mong
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
EUVD-2026-72947
GHSA-q53w-frrr-28f5
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB