libbson Integer Underflow in bson_new_from_buffer Allows DOS via Crafted BSON
CVE-2026-93395 Published on September 17, 2026
Integer Underflow → Heap Out-of-Bounds Read in `bson_new_from_buffer()
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.
Vulnerability Analysis
CVE-2026-93395 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity and availability.
Weakness Type
What is an Integer underflow Vulnerability?
The product subtracts one value from another, such that the result is less than the minimum allowable integer value, which produces a value that is not equal to the correct result. This can happen in signed and unsigned cases.
CVE-2026-93395 has been classified to as an Integer underflow vulnerability or weakness.
Products Associated with CVE-2026-93395
Want to know whenever a new CVE is published for MongoDB C Driver? stack.watch will email you.
Affected Versions
MongoDB Inc. C Driver:- Version 2.0.0 and below 2.3.1 is affected.