---
id: CVE-2026-106431
title: >-
  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
summary: >-
  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 …
severity: medium
cvss: 5.7
cvssVector: 'CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H'
cwe:
  - CWE-787
published: '2026-10-08'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T20:49:23.240'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-106431'
references:
  - url: 'https://jira.mongodb.org/browse/CDRIVER-6418'
    label: cna@mongodb.com
tags:
  - nvd
ingestedAt: '2026-10-08T20:06:22.182Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
