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 products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| MongoDB | C Driver | 2.0.0 – < 2.3.1 | 2.3.1 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | mongo-c-driver | 2.4.0-1 | — |
| Debian 13 | mongo-c-driver | No fix yet | — |
| Debian 12 | mongo-c-driver | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | mongo-c-driver | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 24.04 LTS | mongo-c-driver | No fix yet | — |
| Ubuntu Pro 22.04 LTS | mongo-c-driver | No fix yet | — |
| Ubuntu Pro 20.04 LTS | mongo-c-driver | No fix yet | — |
Advisories 1
- WID-SEC-2026-3453 MongoDB C Driver und Entity Framework Core Provider: Mehrere Schwachstellen BSI CERT-Bund (WID) · Sep 17, 2026