Vulnerability · Published Oct 28, 2026 · Assigned by mongodb

CVE-2026-118581NoSQL injection via mismatched BSON size prefix in raw document splice to the wire protocol

Medium 6.5

In plain English

A medium-severity security flaw in Java Driver from MongoDB. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities).

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.2%top 91.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12mongo-java-driverno fix listedDEBIAN-CVE-2026-118581
Debian:13mongo-java-driverno fix listedDEBIAN-CVE-2026-118581
Debian:14mongo-java-driverno fix listedDEBIAN-CVE-2026-118581

Affected products (as reported)

VendorProductVersions
MongoDB Java Driver 5.8.0 – before 5.14.0

Weakness: CWE-943 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

References