Skip to content
OpenAdvisories
Medium · 4.7 CVE-2024-5629 EUVD-2024-2101GHSA-m87m-mmvp-v9qmPYSEC-2026-1826

Out-of-bounds read in bson module of PyMongo

Published Jun 5, 2024 · Updated Feb 13, 2025 · Assigned by mongodb

Description

An out-of-bounds read in the 'bson' module of PyMongo 4.6.2 or earlier allows deserialization of malformed BSON provided by a Server to raise an exception which may contain arbitrary application memory.

Affected products

VendorProductAffectedFixed
MongoDB PyMongo ≤ 4.6.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pymongo 4.7.3-1 —
Debian 13 pymongo 4.7.3-1 —
Debian 12 pymongo 3.11.0-1+deb12u1 —
Debian 11 pymongo 3.11.0-1+deb11u1 DLA-3889-1
Debian 10 pymongo 3.7.1-1.1+deb10u1 DLA-3832-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS pymongo 3.11.0-1ubuntu0.24.04.1 USN-6904-1
Ubuntu 22.04 LTS pymongo 3.11.0-1ubuntu0.22.04.1 USN-6904-1
Ubuntu 20.04 LTS pymongo 3.10.1-0ubuntu2.1 USN-6904-1
Ubuntu 14.04 LTS pymongo No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS pymongo 3.6.1+dfsg1-1ubuntu0.1~esm1 USN-6904-1
Ubuntu Pro 16.04 LTS pymongo 3.2-1ubuntu0.1~esm1 USN-6904-1
ReleasePackageFixed inAdvisory
RHEL 8 python-PyMySQL +1 0.10.1-2.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 python-distro +1 1.4.0-2.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 python-docs +1 3.6.7-2.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 python-docutils +1 0.14-12.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 python-nose +2 1.3.7-31.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 python-pygments +1 2.2.0-22.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 python-sqlalchemy +2 1.3.2-3.module+el8.10.0+20981+3704b446 RHSA-2025:8419
RHEL 8 python-virtualenv +2 15.1.0-23.module+el8.10.0+22619+61b70790 RHSA-2025:8419
RHEL 8 python-wheel +2 1:0.31.1-3.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 python3-bson +4 3.7.0-2.module+el8.10.0+23071+07f1d18e RHSA-2025:8419
RHEL 8 python36 +3 3.6.8-39.module+el8.10.0+20784+edafcd43 RHSA-2025:8419
RHEL 8 scipy +1 1.0.0-21.module+el8.10.0+20784+edafcd43 RHSA-2025:8419

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 python3-PyMySQL 0.10.1-2.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python3-bson +3 3.7.0-2.module_el8.10.0+3998+2cf36268 ALSA-2025:8419
AlmaLinux 8 python3-distro 1.4.0-2.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python3-docs 3.6.7-2.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python3-docutils 0.14-12.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python3-nose +1 1.3.7-31.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python3-pygments 2.2.0-22.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python3-scipy 1.0.0-21.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python3-sqlalchemy +1 1.3.2-3.module_el8.10.0+3769+3838165b ALSA-2025:8419
AlmaLinux 8 python3-virtualenv +1 15.1.0-23.module_el8.10.0+3937+b6a3652f ALSA-2025:8419
AlmaLinux 8 python3-wheel +1 1:0.31.1-3.module_el8.9.0+3700+efebe9fd ALSA-2025:8419
AlmaLinux 8 python36 +3 3.6.8-39.module_el8.10.0+3769+3838165b ALSA-2025:8419

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 python-PyMySQL 0.10.1-2.module+el8.10.0+1582+bc278001 RLSA-2025:8419
Rocky Linux 8 python-distro 1.4.0-2.module+el8.10.0+1592+61442852 RLSA-2025:8419
Rocky Linux 8 python-docs 3.6.7-2.module+el8.10.0+1592+61442852 RLSA-2025:8419
Rocky Linux 8 python-docutils 0.14-12.module+el8.9.0+1531+a18208f5 RLSA-2025:8419
Rocky Linux 8 python-nose 1.3.7-31.module+el8.9.0+1531+a18208f5 RLSA-2025:8419
Rocky Linux 8 python-pygments 2.2.0-22.module+el8.9.0+1531+a18208f5 RLSA-2025:8419
Rocky Linux 8 python-pymongo 3.7.0-2.module+el8.10.0+1986+6cb2ea52 RLSA-2025:8419
Rocky Linux 8 python-sqlalchemy 1.3.2-3.module+el8.10.0+1602+b47e27fa RLSA-2025:8419
Rocky Linux 8 python-virtualenv 15.1.0-23.module+el8.10.0+1910+234ad790 RLSA-2025:8419
Rocky Linux 8 python-wheel 1:0.31.1-3.module+el8.9.0+1531+a18208f5 RLSA-2025:8419
Rocky Linux 8 python36 3.6.8-39.module+el8.10.0+1592+61442852 RLSA-2025:8419
Rocky Linux 8 scipy 1.0.0-21.module+el8.10.0+1592+61442852 RLSA-2025:8419

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-bson +3 3.10.1-5.amzn2023.0.3 ALAS2023-2024-614

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-pymongo No fix yet —
Azure Linux 2 (CBL-Mariner) python-pymongo No fix yet —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 python3-PyMySQL 0.10.1-2.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-bson +3 3.7.0-2.module+el8.10.0+90599+fd4ba14b ELSA-2025-8419
Oracle Linux 8 python3-distro 1.4.0-2.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-docs 3.6.7-2.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-docutils 0.14-12.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-nose +1 1.3.7-31.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-pygments 2.2.0-22.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-scipy 1.0.0-21.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-sqlalchemy +1 1.3.2-3.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-virtualenv +1 15.1.0-23.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python3-wheel +1 1:0.31.1-3.module+el8.10.0+90473+c30184f9 ELSA-2025-8419
Oracle Linux 8 python36 +3 3.6.8-39.module+el8.10.0+90473+c30184f9 ELSA-2025-8419

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling kubeflow-pipelines-visualization-server 2.2.0-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI pymongo < 4.6.3 4.6.3 GHSA-m87m-mmvp-v9qm

Advisories 9

References