CVE-2026-96749Heap out-of-bounds write via signed size overflow in BSON document encoding
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
Fixed builds are available from AlmaLinux, Debian, PyPI, Red Hat, Rocky Linux: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Ubuntu 26.04 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Ubuntu 24.04 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Ubuntu 22.04 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Ubuntu 20.04 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Ubuntu 18.04 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Ubuntu 16.04 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Ubuntu 14.04 | pymongo | Fix pending | UBUNTU-CVE-2026-96749 | |
| Debian 14 | pymongo | Fixed | 4.18.2-1 | DEBIAN-CVE-2026-96749 |
| Debian 13 | pymongo | Fix pending | DEBIAN-CVE-2026-96749 | |
| Debian 12 | pymongo | Fixed | 3.11.0-1+deb12u2 | DEBIAN-CVE-2026-96749 |
| Red Hat Enterprise Linux 8 | python-PyMySQL | Fixed | 0:0.10.1-2.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-distro | Fixed | 0:1.4.0-2.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-docs | Fixed | 0:3.6.7-2.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-docutils | Fixed | 0:0.14-12.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-nose | Fixed | 0:1.3.7-31.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-nose-docs | Fixed | 0:1.3.7-31.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-pygments | Fixed | 0:2.2.0-22.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-pymongo | Fixed | 0:3.7.0-4.module+el8.10.0+25289+e70afdde | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-pymongo-doc | Fixed | 0:3.7.0-4.module+el8.10.0+25289+e70afdde | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-sqlalchemy | Fixed | 0:1.3.2-3.module+el8.10.0+20981+3704b446 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-sqlalchemy-doc | Fixed | 0:1.3.2-3.module+el8.10.0+20981+3704b446 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-virtualenv | Fixed | 0:15.1.0-23.module+el8.10.0+22619+61b70790 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-virtualenv-doc | Fixed | 0:15.1.0-23.module+el8.10.0+22619+61b70790 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python-wheel | Fixed | 1:0.31.1-3.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-PyMySQL | Fixed | 0:0.10.1-2.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-bson | Fixed | 0:3.7.0-4.module+el8.10.0+25289+e70afdde | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-distro | Fixed | 0:1.4.0-2.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-docs | Fixed | 0:3.6.7-2.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-docutils | Fixed | 0:0.14-12.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-nose | Fixed | 0:1.3.7-31.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-pygments | Fixed | 0:2.2.0-22.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-pymongo | Fixed | 0:3.7.0-4.module+el8.10.0+25289+e70afdde | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-pymongo-gridfs | Fixed | 0:3.7.0-4.module+el8.10.0+25289+e70afdde | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-scipy | Fixed | 0:1.0.0-21.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-sqlalchemy | Fixed | 0:1.3.2-3.module+el8.10.0+20981+3704b446 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-virtualenv | Fixed | 0:15.1.0-23.module+el8.10.0+22619+61b70790 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-wheel | Fixed | 1:0.31.1-3.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python3-wheel-wheel | Fixed | 1:0.31.1-3.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python36 | Fixed | 0:3.6.8-39.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python36-debug | Fixed | 0:3.6.8-39.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python36-devel | Fixed | 0:3.6.8-39.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | python36-rpm-macros | Fixed | 0:3.6.8-39.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| Red Hat Enterprise Linux 8 | scipy | Fixed | 0:1.0.0-21.module+el8.10.0+20784+edafcd43 | RHSA-2026:102653 |
| AlmaLinux 8 | python-nose-docs | Fixed | 1.3.7-31.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python-pymongo-doc | Fixed | 3.7.0-4.module_el8.10.0+4390+02a348a7 | ALSA-2026:102653 |
| AlmaLinux 8 | python-sqlalchemy-doc | Fixed | 1.3.2-3.module_el8.10.0+3769+3838165b | ALSA-2026:102653 |
| AlmaLinux 8 | python-virtualenv-doc | Fixed | 15.1.0-23.module_el8.10.0+3937+b6a3652f | ALSA-2026:102653 |
| AlmaLinux 8 | python3-PyMySQL | Fixed | 0.10.1-2.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-bson | Fixed | 3.7.0-4.module_el8.10.0+4390+02a348a7 | ALSA-2026:102653 |
| AlmaLinux 8 | python3-distro | Fixed | 1.4.0-2.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-docs | Fixed | 3.6.7-2.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-docutils | Fixed | 0.14-12.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-nose | Fixed | 1.3.7-31.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-pygments | Fixed | 2.2.0-22.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-pymongo | Fixed | 3.7.0-4.module_el8.10.0+4390+02a348a7 | ALSA-2026:102653 |
| AlmaLinux 8 | python3-pymongo-gridfs | Fixed | 3.7.0-4.module_el8.10.0+4390+02a348a7 | ALSA-2026:102653 |
| AlmaLinux 8 | python3-scipy | Fixed | 1.0.0-21.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-sqlalchemy | Fixed | 1.3.2-3.module_el8.10.0+3769+3838165b | ALSA-2026:102653 |
| AlmaLinux 8 | python3-virtualenv | Fixed | 15.1.0-23.module_el8.10.0+3937+b6a3652f | ALSA-2026:102653 |
| AlmaLinux 8 | python3-wheel | Fixed | 1:0.31.1-3.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python3-wheel-wheel | Fixed | 1:0.31.1-3.module_el8.9.0+3700+efebe9fd | ALSA-2026:102653 |
| AlmaLinux 8 | python36 | Fixed | 3.6.8-39.module_el8.10.0+3769+3838165b | ALSA-2026:102653 |
| AlmaLinux 8 | python36-debug | Fixed | 3.6.8-39.module_el8.10.0+3769+3838165b | ALSA-2026:102653 |
| AlmaLinux 8 | python36-devel | Fixed | 3.6.8-39.module_el8.10.0+3769+3838165b | ALSA-2026:102653 |
| AlmaLinux 8 | python36-rpm-macros | Fixed | 3.6.8-39.module_el8.10.0+3769+3838165b | ALSA-2026:102653 |
| Rocky Linux 8 | python-nose-docs | Fixed | 0:1.3.7-31.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python-pymongo-doc | Fixed | 0:3.7.0-4.module+el8.10.0+40501+3e16d3fe | RLSA-2026:102653 |
| Rocky Linux 8 | python-sqlalchemy-doc | Fixed | 0:1.3.2-3.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python-virtualenv-doc | Fixed | 0:15.1.0-23.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-PyMySQL | Fixed | 0:0.10.1-2.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-bson | Fixed | 0:3.7.0-4.module+el8.10.0+40501+3e16d3fe | RLSA-2026:102653 |
| Rocky Linux 8 | python3-distro | Fixed | 0:1.4.0-2.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-docs | Fixed | 0:3.6.7-2.module+el8.10.0+1592+61442852 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-docutils | Fixed | 0:0.14-12.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-nose | Fixed | 0:1.3.7-31.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-pygments | Fixed | 0:2.2.0-22.module+el8.10.0+1592+61442852 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-pymongo | Fixed | 0:3.7.0-4.module+el8.10.0+40501+3e16d3fe | RLSA-2026:102653 |
| Rocky Linux 8 | python3-pymongo-gridfs | Fixed | 0:3.7.0-4.module+el8.10.0+40501+3e16d3fe | RLSA-2026:102653 |
| Rocky Linux 8 | python3-scipy | Fixed | 0:1.0.0-21.module+el8.10.0+1592+61442852 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-sqlalchemy | Fixed | 0:1.3.2-3.module+el8.10.0+1602+b47e27fa | RLSA-2026:102653 |
| Rocky Linux 8 | python3-virtualenv | Fixed | 0:15.1.0-23.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-wheel | Fixed | 1:0.31.1-3.module+el8.10.0+1592+61442852 | RLSA-2026:102653 |
| Rocky Linux 8 | python3-wheel-wheel | Fixed | 1:0.31.1-3.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python36 | Fixed | 0:3.6.8-39.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| Rocky Linux 8 | python36-debug | Fixed | 0:3.6.8-39.module+el8.10.0+1592+61442852 | RLSA-2026:102653 |
| Rocky Linux 8 | python36-devel | Fixed | 0:3.6.8-39.module+el8.10.0+1592+61442852 | RLSA-2026:102653 |
| Rocky Linux 8 | python36-rpm-macros | Fixed | 0:3.6.8-39.module+el8.10.0+1910+234ad790 | RLSA-2026:102653 |
| PyPI library | pymongo | Fixed | 4.18.2 | PYSEC-2026-4296 |
What the vendor says
As published in the CVE record by mongodb, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- MongoDB Python Driver: affected: 1.9.0 to before 4.18.2; fixed in
4.18.2
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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.