CVE-2026-93395: CWE-191: Integer Underflow (Wrap or Wraparound) in MongoDB Inc. C Driver
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.
AI Analysis
Technical Summary
The vulnerability arises from missing lower-bound validation in the bson_new_from_buffer() function of libbson, part of the MongoDB C Driver. The function reads a 32-bit document length from the input buffer but does not verify that it meets the minimum valid BSON document size of 5 bytes. When the length is zero, an integer underflow occurs during an array index calculation, wrapping to UINT32_MAX. This causes a heap out-of-bounds read, resulting in a process crash. The flaw can be triggered by an unauthorized party supplying crafted BSON data, leading to denial of service.
Potential Impact
The primary impact is a denial of service due to a heap out-of-bounds read and process crash. There is no indication of privilege escalation, data corruption, or code execution. The vulnerability can be exploited remotely by an attacker who can supply malicious BSON input to an application using the affected MongoDB C Driver versions.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a patch is available, applications should validate BSON input length before passing it to the vulnerable function or implement input filtering to prevent zero-length BSON documents.
CVE-2026-93395: CWE-191: Integer Underflow (Wrap or Wraparound) in MongoDB Inc. C Driver
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.
CVSS v4.0
Score 6.9medium
Affected software
MongoDB Inc.
C Driver
pkg:github/mongodb/mongo-c-driverRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from missing lower-bound validation in the bson_new_from_buffer() function of libbson, part of the MongoDB C Driver. The function reads a 32-bit document length from the input buffer but does not verify that it meets the minimum valid BSON document size of 5 bytes. When the length is zero, an integer underflow occurs during an array index calculation, wrapping to UINT32_MAX. This causes a heap out-of-bounds read, resulting in a process crash. The flaw can be triggered by an unauthorized party supplying crafted BSON data, leading to denial of service.
Potential Impact
The primary impact is a denial of service due to a heap out-of-bounds read and process crash. There is no indication of privilege escalation, data corruption, or code execution. The vulnerability can be exploited remotely by an attacker who can supply malicious BSON input to an application using the affected MongoDB C Driver versions.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a patch is available, applications should validate BSON input length before passing it to the vulnerable function or implement input filtering to prevent zero-length BSON documents.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- mongodb
- Date Reserved
- 2026-09-17T20:11:01.369Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6aac51e755bf5e2cf5e0cf19
Added to database: 09/17/2026, 20:47:35 UTC
Last enriched: 09/17/2026, 21:32:27 UTC
Last updated: 09/18/2026, 01:15:05 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.