Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-93395 EUVD-2026-82471GHSA-jm9m-v7jc-m4j8

Integer Underflow → Heap Out-of-Bounds Read in `bson_new_from_buffer()

Published Sep 17, 2026 · Updated Sep 18, 2026 · Assigned by mongodb

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

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

ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
Ubuntu 26.04 LTS mongo-c-driver No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
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

References