Skip to content
OpenAdvisories
Medium · 5.7 CVE-2026-106431 EUVD-2026-95152

One-byte heap buffer overflow in BSON bulk document writer in MongoDB C Driver

Published Oct 8, 2026 · Updated Oct 8, 2026 · Assigned by mongodb

Description

An off-by-one error in the BSON bulk document writer in the MongoDB C Driver can write one zero byte immediately past a heap allocation when a document ends at a specific buffer boundary. An actor who can influence the size of documents serialized by an embedding application can corrupt adjacent process memory or terminate the process. Reaching this issue requires the application to use the BSON bulk-writer API and produce a precise cumulative document size.

Affected products

VendorProductAffectedFixed
MongoDB C Driver 0.5.0 – < 1.30.13, 2.0.0 – < 2.5.6 1.30.13

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.5.6-1 —
Debian 13 mongo-c-driver No fix yet —
Debian 12 mongo-c-driver No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 mongo-c-driver No fix yet —
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