What’s Vulnerable › Vulnerabilities

CVE-2026-106431: One-byte heap buffer overflow in BSON bulk document writer in MongoDB C Driver

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

How to fix

Upgrade to a fixed version: MongoDB C# Driver 1.30.13, 2.5.6. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2026-106431 or the next vulnerability affects your stack