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

> An integer overflow in the MongoDB Python Driver's BSON encoding allows unprivileged attackers to trigger out-of-bounds writes, potentially leading to code execution or crashes.

- **Severity:** High 7.5 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Sep 2026
- **Updated:** 26 Sep 2026
- **Also known as:** AZL-105110, DEBIAN-CVE-2026-96749, ECHO-edca-11e2-60b0, GHSA-v4x9-3549-crwv, MINI-vcrv-gmw5-45rr, PYSEC-2026-4296, ROOT-APP-PYPI-CVE-2026-96749, UBUNTU-CVE-2026-96749

## What is CVE-2026-96749?

CVE-2026-96749 is a high-severity vulnerability in MongoDB Python Driver, published on 24 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.

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

Weakness: CWE-190 (Integer Overflow or Wraparound)

## Which versions are affected by CVE-2026-96749?

3 open source packages ship an affected version, including pymongo.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pymongo` | PyPI | All versions | 4.18.2 |
| `pymongo` | PyPI | All versions | 4.18.2 |
| `pymongo` | PyPI | All versions | 4.18.2 |

## How do I fix CVE-2026-96749?

Upgrade pymongo to 4.18.2 or later.

## Is CVE-2026-96749 being exploited?

There is no known exploitation of CVE-2026-96749 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-96749 and fix it if it is affected.

What it is: CVE-2026-96749 is a high-severity vulnerability in MongoDB Python Driver, published on 24 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-96749 in the wild and no public exploit code.

Affected packages and fixed versions:
- pymongo (PyPI): affected all versions; fixed in 4.18.2
- pymongo (PyPI): affected all versions; fixed in 4.18.2
- pymongo (PyPI): affected all versions; fixed in 4.18.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-96749/ (Markdown: https://insights.sbomify.com/CVE-2026-96749/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-96749
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-96749
- OSV: https://osv.dev/vulnerability/CVE-2026-96749

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-96749/
Summaries are generated and may contain mistakes; the official description above is the record.
