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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: High; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-190
- **Aliases:** GHSA-v4x9-3549-crwv, PYSEC-2026-4296
- **Published:** 2026-09-24T18:18:13.077Z
- **Modified:** 2026-10-15T14:56:20.520Z

## Who should check

- Projects that depend on PyPI package pymongo (\< 4.18.2)
- Anyone running MongoDB Python Driver \>= 1.9.0, \< 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.

## Affected and fixed versions

- PyPI `pymongo`: affected \< 4.18.2; fixed 4.18.2 (osv)
- MongoDB Python Driver: \>= 1.9.0, \< 4.18.2 (cvelist)

## Mitigation

- Upgrade pymongo to 4.18.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-96749. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-96749.md
Affected: pymongo < 4.18.2
Fixed in: 4.18.2

Steps:
1. Search this machine and project for pymongo (PyPI), MongoDB Python Driver: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-96749 being exploited?

There is no confirmed exploitation: CVE-2026-96749 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.19% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-96749?

High: CVSS 7.5 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

pymongo \< 4.18.2.

### Is there a fix for CVE-2026-96749?

Yes. Fixed in 4.18.2. Upgrade pymongo to 4.18.2 or later.

### How do I check if I'm affected by CVE-2026-96749?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/mongodb/mongo-python-driver/security/advisories/GHSA-v4x9-3549-crwv>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-96749>
- vendor: <https://github.com/advisories/GHSA-v4x9-3549-crwv>
- patch: <https://github.com/mongodb/mongo-python-driver/pull/3066>
- patch: <https://github.com/mongodb/mongo-python-driver/commit/640dd2383a1a2fb1a10e5222d50ebc0b22a61bd7>
- patch: <https://github.com/mongodb/mongo-python-driver/commit/6ab44be0e97c9d1d5a23725c4978fb25f3249485>
- other: <https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.2>
- other: <https://github.com/mongodb/mongo-python-driver/blob/4.18.2/doc/changelog.rst>
- other: <https://github.com/mongodb/mongo-python-driver>
- other: <https://www.mongodb.com/community/forums/t/pymongo-4-18-2-released/343732>
- other: <https://pypi.org/project/pymongo>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-96749>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-v4x9-3549-crwv> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-4296> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-96749> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-96749>
