CVE-2026-96749: MongoDB Python Driver integer overflow in BSON encoding

CVE-2026-96749 · Severity: high · CVSS 8.4 · Published 2026-09-24

MongoDB's Python driver contains an integer overflow vulnerability in its BSON document encoder that can occur when processing exceptionally large documents. An attacker who can supply large data values to an application could cause the encoder to write outside allocated memory, potentially leading to data corruption, application crashes, or arbitrary code execution within the application process.

Technologies: MongoDB Python Driver, pymongo (PyPI). Vendors: MongoDB, PyPI.

Quick answers

Is CVE-2026-96749 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-96749 being exploited in the wild.
How severe is CVE-2026-96749?
High severity, with a CVSS score of 8.4, published 24 September 2026.
Which products and versions are affected?
MongoDB Python Driver before 4.18.2; pymongo (PyPI) < 4.18.2, ECOSYSTEM:introduced=0,fixed=4.18.2.
Is there a fix for CVE-2026-96749?
Yes. pymongo (PyPI): upgrade to 4.18.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-96749 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-96749?
Check whether you run MongoDB Python Driver or pymongo (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • pymongo (PyPI): upgrade to 4.18.2 or later
    pip install "pymongo>=4.18.2"

Technical details

The vulnerability is a signed 32-bit integer overflow in the BSON document encoding component of the native extension. The overflow guard condition exhibits undefined behavior under the C language standard, allowing a buffer over-write when a single document exceeds certain size thresholds. An unprivileged attacker with the ability to control input data being encoded can trigger this condition; no authentication or special privileges are required.

Affected products

  • MongoDB Python Driver before 4.18.2

Identifiers

  • CVE-2026-96749
  • GHSA-v4x9-3549-crwv
  • PYSEC-2026-4296

Timeline

  • 2026-09-24: disclosed: CVE-2026-96749 published
  • 2026-09-24: patched: Fixed in PyMongo 4.18.2

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.