CVE-2026-118581

published 28 Oct 2026 · updated 5 Nov 2026

NoSQL injection via mismatched BSON size prefix in raw document splice to the wire protocol

6.5MediumCVSS 6.5EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Java Driver 5.14.0.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
MongoDBJava Driver>=5.8.0 <5.14.05.14.0

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in MongoDB, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2026-118581 severity on Zeptric[![CVE-2026-118581](https://zeptric.io/badge/cve/CVE-2026-118581.svg)](https://zeptric.io/cve/CVE-2026-118581)