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

- Severity: Medium 6.9 (CVSS:4.0, scored by mongodb) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 19% of CVEs (2026-12-01)
- Published: 2026-10-28T16:51:21.960Z
- Modified: 2026-11-05T17:17:53.377Z
- Weaknesses: CWE-943
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: mongodb

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

(As written by CVE List.)

## Affected

- MongoDB Java Driver: from 5.8.0 before 5.14.0

## Every score

- mongodb: CVSS:4.0 6.9 Medium `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`
- mongodb: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/mongodb/mongo-java-driver/releases/tag/r5.14.0>

## Sources

- CVE List: [CVE-2026-118581](https://www.cve.org/CVERecord?id=CVE-2026-118581), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2026-118581](https://nvd.nist.gov/vuln/detail/CVE-2026-118581), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2026-118581 · Whole record: https://cve.day/CVE-2026-118581.json · Rebuilt by cve.day 2026-11-25T22:59:47.643Z
