Vulnerability · Published Sep 17, 2026 · Assigned by mongodb
CVE-2026-93395Integer Underflow → Heap Out-of-Bounds Read in `bson_new_from_buffer()
Medium 5.3
In plain English
A medium-severity security flaw in C Driver from MongoDB Inc.. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 35% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | mongo-c-driver | no fix listed | DEBIAN-CVE-2026-93395 |
| Debian:13 | mongo-c-driver | no fix listed | DEBIAN-CVE-2026-93395 |
| Debian:14 | mongo-c-driver | 2.4.0-1 | DEBIAN-CVE-2026-93395 |
| Ubuntu:26.04:LTS | mongo-c-driver | no fix listed | UBUNTU-CVE-2026-93395 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| MongoDB Inc. | C Driver | 2.0.0 – before 2.3.1 |
Weakness: CWE-191 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L