Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInfluence raw BSON bytes via victim app
-
DeliveryCraft document with inconsistent self-declared length
-
ExploitApp wraps bytes into a database command
-
ExecutionDatabase parses trailing bytes as extra command fields
-
ImpactAlter data read or written under app credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
|
| Exploitation Conditions | The vulnerable path is reached only when the application constructs a MongoDB command from a raw BSON document (e.g., wrapping externally supplied/untrusted bytes as a raw document) and sends it as part of a command; the driver fails to check that the document's self-declared length matches the extent of the provided byte range before copying it. No authentication to the driver or database and no user interaction are required beyond the attacker's ability to influence those bytes through the application. The key limiting factor is this non-default usage pattern: applications that build commands from normal typed/validated documents rather than untrusted raw bytes are not exposed, which materially narrows real-world attack surface despite PR:N. |
| Impact | This is a medium-severity (CVSS 4.0 base 6.9, MongoDB-reported) NoSQL command-injection flaw (CWE-943) in the BSON encoding path of the MongoDB Java Driver. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N) indicates network reach, low complexity, no authentication to the driver/database and no user interaction, with low confidentiality and low integrity impact and no availability impact - consistent with the description's 'unintended modification of the command actually executed, altering data read or written.' The vuln.today priority is 'this_month' rather than act_now/emergency. No EPSS score, no CISA KEV listing, and no public exploit were supplied; the only reference is the MongoDB 5.14.0 release notes. The practical caveat the raw CVSS does not capture: exploitation is gated on an application-side coding pattern - the victim app must wrap untrusted raw bytes in a raw BSON document and submit it as part of a command - so despite PR:N at the driver level, real-world exposure is narrower than a generic network-unauthenticated flaw. Net: a legitimate issue to patch on a normal cycle, not an emergency, with real risk concentrated in applications that handle untrusted raw BSON. |
| Exploit ScenarioDerived | An attacker supplies crafted raw bytes to an application that wraps them in a raw BSON document and submits it as part of a MongoDB command. Because the driver does not verify the document's self-declared length against the actual byte range before copying it, the database parses attacker-controlled trailing content as additional command fields, altering the query executed under the application's credentials. No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 28, 2026
Command injection in the BSON encoding path of the MongoDB Java Driver lets an application that wraps externally supplied, untrusted bytes in a raw BSON document emit a structurally inconsistent command, so the database can interpret attacker-supplied trailing content as additional fields of the surrounding command and alter the data read or written under the application's credentials. All versions covered by the cpe:2.3:a:mongodb:java_driver wildcard are affected, and the vendor fixed the issue in the 5.14.0 release dated October 28, 2026. Severity is medium (CVSS 4.0 base 6.9; independently assessed as CVSS:3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N): no authentication to the driver or database and no user interaction are required beyond the ability to influence those bytes, but exposure is confined to the non-default pattern of building commands from untrusted raw documents, applications using typed or validated documents are not exposed, and no public exploit has been identified at time of analysis.
RemediationAI
Upgrade to MongoDB Java Driver 5.14.0 (released October 28, 2026), which contains the fix hardening BsonBinaryReader.skipValue() size validation and array allocations (PR #1990); release notes are at https://github.com/mongodb/mongo-java-driver/releases/tag/r5.14.0. If the upgrade cannot be scheduled immediately, the effective compensating control is to remove untrusted bytes from the raw-document path: do not wrap externally supplied byte arrays in raw BSON documents that become part of an outgoing command, and instead parse, validate and re-encode such input into typed documents whose encoding the driver generates itself - this closes the exposure but requires application code changes and may mean rejecting or normalizing inputs the application previously passed through verbatim. The available references list no vendor-published configuration flag or workaround beyond the fixed release.
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
BSON is MongoDB's binary serialization format, and each document begins with a little-endian int32 declaring the document's total byte length, followed by typed elements and a terminating null byte. The Java Driver's encoding layer accepts 'raw' documents - caller-supplied byte sequences that the driver copies into an outgoing command rather than re-encoding - and the flaw is that it does not reconcile a raw document's self-declared length with the extent of the byte range actually handed to it before that range is copied. When an application wraps untrusted external bytes this way, content trailing the declared document can be absorbed by the server as additional fields of the enclosing command, a data-query-logic injection (CWE-943) that changes the semantics of the command executed under the application's credentials. The upstream fix shipped in 5.14.0 is the change titled 'Harden BsonBinaryReader.skipValue() size validation and array allocations' (PR #1990), which locates the correction in length and size validation within the binary reader. The trigger requires the application to take the raw-document route with untrusted input; the mechanism by which an application might be induced to do so is not described in the available sources, and drivers constructing commands from ordinary typed documents do not exercise this path.
Know when Java Driver 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:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
No driver/database authentication or interaction needed (PR:N/UI:N) and the injected bytes reach the database over the network (AV:N/AC:L); partial read/write influence over the executed command gives C:L/I:L, A:N.
Primary rating from Vendor (mongodb).
CVSS VectorVendor: mongodb
Lifecycle Timeline
1DescriptionCVE.org
A BSON encoding component of the MongoDB Java Driver does not verify that an externally supplied raw document's self-declared length agrees with the extent of the byte range it is given before that range is copied into an outgoing database command. An application that wraps untrusted raw bytes in such a document and uses it as part of a command can therefore emit a structurally inconsistent message, causing the database to interpret attacker-supplied trailing content as additional fields of the surrounding command. No authentication to the driver or database is required beyond the ability to influence those bytes through the victim application, and no user interaction is needed. The result is unintended modification of the command actually executed, which can alter the data read or written under the application's credentials.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.
More in Java Driver
View allUse-after-free in the reactive client-side encryption component of the MongoDB Java Driver allows a party that can cance
Cleartext credential logging in the MongoDB Java Driver exposes outbound network connectivity credentials to any party w
Specific versions of the Java driver that support client-side field level encryption (CSFLE) fail to perform correct hos
NoSQL injection in the GridFS component of the MongoDB Java Driver allows an authenticated low-privilege user who can in
EUVD-2026-112257
NVD
CVE.org
GitHub
Exploit-DB