MongoDBGHSA-8pmv-3r2g-3rr6
One-byte heap buffer overflow in BSON bulk document writer in MongoDB C Driver
Fix: upgrade to 1.30.13 or later (2 fixed versions below)
Impact
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.
Patches
Fixed in 1.30.13 and 2.5.6.
Workarounds
None.
References
https://www.cve.org/CVERecord?id=CVE-2026-106431
https://jira.mongodb.org/browse/CDRIVER-6418
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| MongoDB C Driver Product | >= 0.5.0, < 1.30.13 | 1.30.13 |
| >= 2.0.0, < 2.5.6 | 2.5.6 |
Details and references
- CVSS 4.0
- CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-787