CVE-2026-106431

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

Published Oct 8, 2026 CVSS 4.0 · 5.9 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

An off‑by‑one error in the BSON bulk document writer of the MongoDB C Driver causes a single zero byte to be written past the end of a heap allocation when a document ends precisely at a buffer boundary. This write can corrupt adjacent memory or terminate the process. The flaw is not a direct code‑execution vector, but it can lead to unintended data corruption or denial of service if an attacker can influence the size of the documents serialized by the embedding application. The impact is therefore memory corruption that may culminate in application crashes or instability.

Affected Systems

The vulnerability affects the MongoDB C Driver. No specific version range is listed in the CVE data, so any deployment that has not applied the latest fix is potentially impacted.

Risk and Exploitability

The CVSS score of 5.9 indicates moderate severity. EPSS is not available, and the issue is not currently listed in the CISA KEV catalog, suggesting low or uncertain exploitation probability. The exploitation path requires the application to use the BSON bulk‑writer API and construct documents that cumulatively reach the critical boundary size. Without such a precise payload, the vulnerability is unlikely to be leveraged, but it remains a risk for applications that meet the stated conditions.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the MongoDB C Driver to the latest patched release that corrects the off‑by‑one write
  • If an immediate upgrade is not feasible, modify the application to avoid using the BSON bulk writer API or enforce strict size limits that prevent the boundary condition from being met
  • Implement runtime safeguards such as memory corruption detection, canaries, or fuzzing to monitor for and mitigate accidental memory writes, and watch for abnormal process termination events

Generated by OpenCVE AI on October 8, 2026 at 20:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:mongodb:c_driver:*:*:*:*:*:mongodb:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Mongodb
Mongodb c Driver
Vendors & Products Mongodb
Mongodb c Driver
Type Values Removed Values Added
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.
Title One-byte heap buffer overflow in BSON bulk document writer in MongoDB C Driver
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 5.7, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H'}

cvssV4_0

{'score': 5.9, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
mongodb
Published
Updated
Oct 8, 2026, 7:19 PM
Reserved
Oct 6, 2026, 4:40 PM
Status
Analyzed
Published
Oct 8, 2026, 7:16 PM
Modified
Nov 17, 2026, 8:03 PM