MongoDB C Driver: integer overflow
Medium6.9CVE-2026-93395 · Published Sep 17, 2026 · updated Sep 25, 2026
A missing lower-bound validation in the bson_new_from_buffer() function of libbson allows an integer underflow when processing BSON data with a zero-length prefix. The function reads a 32-bit document length from the input buffer but does not verify that the value is at least 5 (the minimum valid BSON document size) before using it in an array index calculation. When the length field is zero, the expression used to check the document's null terminator wraps to UINT32_MAX, causing a heap out-of-bounds read that crashes the process. An unauthorized party who can supply crafted BSON input to an application using this API can cause a denial of service.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| C Driver Product | >= 2.0.0, < 2.3.1 | 2.3.1 |
Details and references
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- Severity from
- the vendor (its own CVE record or advisory)
- Weakness
- CWE-191
More MongoDB advisories
All MongoDB| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Sep 18 | MongoDB Mongoid: unsafe reflection | High8.3 | No fix yet |
| Sep 18 | Heap overflow via oversized decrypted TLS record sequence in Windows Secure Channel stream | High8.1 | 1.30.11+1 more |
| Sep 17 | Insertion of Sensitive Information into Log File | Medium5.7 | 8.4.4 |
| Sep 17 | Silent plaintext storage of encrypted fields via mis-keyed encryption map in the EF Core provider | Medium6.8 | 8.4.4 |
| Sep 17 | A flaw in libmongoc's SCRAM authentication implementation caused the client to... | Medium6.3 | 2.3.2 |
| Sep 17 | MongoDB Entity Framework Core Provider: missing encryption | Medium6.8 | 8.4.3+2 more |