# CVE-2026-106437: MongoDB C Driver BSON buffer underflow in bson_reserve_buffer

Source: https://junglewise.ai/threats/cve-2026-106437-the-bson-buffer-reservation-api-in-the-mongodb-c-driver-can  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-08. Updated: 2026-10-16  
License: CC BY 4.0 with a link back

CVE-2026-106437 · Severity: medium · CVSS 6.2 · Published 2026-10-08

The MongoDB C Driver's BSON buffer-reservation API fails to validate minimum buffer sizes, allowing applications that pass undersized values to suffer memory corruption or crash. An attacker who can control the length parameter supplied to an embedding application could cause data loss, memory disclosure, or denial of service.

Technologies: [MongoDB C Driver](https://junglewise.ai/threats/technologies/c-driver). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb).

## Quick answers

**Is CVE-2026-106437 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-106437 being exploited in the wild.

**How severe is CVE-2026-106437?** Medium severity, with a CVSS score of 6.2, published 8 October 2026.

**Which products and versions are affected?** MongoDB C Driver before 2.5.6 and before 1.30.13.

**Is there a fix for CVE-2026-106437?** Yes: fixed in C Driver 2.5.6, 1.30.13. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-106437 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-106437?** Check whether you run MongoDB C Driver at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in C Driver 2.5.6, 1.30.13

## Technical details

The bson_reserve_buffer API does not enforce the five-byte BSON minimum length requirement, permitting a caller to reserve a buffer smaller than spec. Subsequent append or comparison operations perform unsigned arithmetic on the length field, causing buffer underflow and out-of-bounds reads or writes. This requires the embedding application to pass user-controlled or insufficiently validated data as the length parameter to the vulnerable function.

## Affected products

- MongoDB C Driver before 2.5.6 and before 1.30.13

## Timeline

- 2026-10-08: disclosed

## References

- [https://jira.mongodb.org/browse/CDRIVER-6423](https://jira.mongodb.org/browse/CDRIVER-6423)

## Related threats

- [MongoDB C# Driver BSON type allow-list bypass](https://junglewise.ai/threats/cve-2026-126982-a-type-allow-list-bypass-in-the-bson-serialization-library-of)
- [MongoDB C Driver namespace field validation bypass](https://junglewise.ai/threats/cve-2026-120956-the-mongodb-c-driver-does-not-validate-the-type-or-format-of-a)
- [MongoDB C Driver GridFS file download denial of service](https://junglewise.ai/threats/cve-2026-120955-the-gridfs-file-download-api-in-the-mongodb-c-driver-does-not)
- [MongoDB C Driver memory-initialization flaw in GridFS](https://junglewise.ai/threats/cve-2026-120684-a-memory-initialization-flaw-in-the-legacy-gridfs-file-handling)
- [MongoDB C Driver memory leak in compressed responses](https://junglewise.ai/threats/cve-2026-120678-a-memory-management-flaw-in-the-mongodb-c-driver-s-handling-of)
