NoSQL injection via mismatched BSON size prefix in raw document splice to the wire protocol
Impact
The MongoDB Java Driver 5.8.0 is affected by a NoSQL injection vulnerability due to a mismatched BSON size prefix, allowing an attacker to modify database commands without authentication. The attacker must be able to influence raw bytes through the victim application. This can alter data read or written under the application's credentials.
Summarized by @cf/meta/llama-3.3-70b-instruct-fp8-fast. Verify details against the original sources.Affected packages
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
MongoDB · mongodb
Java Driver
1 range
MongoDB · mongodb
Java Driver
Compare with this publisher’s ranges. This does not inspect your installation.
affected
5.8.0 → before 5.14.0
semver versions
Other versions: unaffected
Original source description
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.
Inside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-118581View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Contributing organizations · 1
Assigning organization
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.