CVE-2024-5629 json
Out-of-bounds read in bson module of PyMongo
published 2024-06-05 2 y ago modified 2026-09-10 1 mo ago also GHSA-m87m-mmvp-v9qm , PYSEC-2026-1826 , EUVD-2024-2101
- cvss
- 4.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 51%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi pymongo 4.6.3
- mongodb pymongo 4.6.3
- pymongo Debian 12 3.11.0-1+deb12u1
- pymongo Debian 14, Debian 13 4.7.3-1
debian advisories DEBIAN-CVE-2024-5629
- pymongo Ubuntu 20.04 LTS 3.10.1-0ubuntu2.1
- pymongo Ubuntu 22.04 LTS 3.11.0-1ubuntu0.22.04.1
- pymongo Ubuntu 24.04 LTS 3.11.0-1ubuntu0.24.04.1
- pymongo Ubuntu Pro 16.04 LTS 3.2-1ubuntu0.1~esm1
- pymongo Ubuntu Pro 18.04 LTS 3.6.1+dfsg1-1ubuntu0.1~esm1
ubuntu advisories UBUNTU-CVE-2024-5629
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- scipy RHEL 8 1.0.0-21.module+el8.10.0+20784+edafcd43
- python36 RHEL 8 3.6.8-39.module+el8.10.0+20784+edafcd43
- python-nose RHEL 8 1.3.7-31.module+el8.10.0+20784+edafcd43
- python-wheel RHEL 8 1:0.31.1-3.module+el8.10.0+20784+edafcd43
- python3-bson RHEL 8 3.7.0-2.module+el8.10.0+23071+07f1d18e
- python3-nose RHEL 8 1.3.7-31.module+el8.10.0+20784+edafcd43
- python-distro RHEL 8 1.4.0-2.module+el8.10.0+20784+edafcd43
- python3-scipy RHEL 8 1.0.0-21.module+el8.10.0+20784+edafcd43
red hat advisories RHSA-2025:8419
- python36 AlmaLinux 8 3.6.8-39.module_el8.10.0+3769+3838165b
- python3-bson AlmaLinux 8 3.7.0-2.module_el8.10.0+3998+2cf36268
- python3-nose AlmaLinux 8 1.3.7-31.module_el8.9.0+3700+efebe9fd
- python3-scipy AlmaLinux 8 1.0.0-21.module_el8.9.0+3700+efebe9fd
- python3-wheel AlmaLinux 8 1:0.31.1-3.module_el8.9.0+3700+efebe9fd
- python3-distro AlmaLinux 8 1.4.0-2.module_el8.9.0+3700+efebe9fd
- python3-pymongo AlmaLinux 8 3.7.0-2.module_el8.10.0+3998+2cf36268
- python3-PyMySQL AlmaLinux 8 0.10.1-2.module_el8.9.0+3700+efebe9fd
almalinux advisories ALSA-2025:8419
- scipy Rocky Linux 8 1.0.0-21.module+el8.10.0+1910+234ad790
- scipy Rocky Linux 8 1.0.0-21.module+el8.10.0+1592+61442852
- python36 Rocky Linux 8 3.6.8-39.module+el8.10.0+1910+234ad790
- python36 Rocky Linux 8 3.6.8-39.module+el8.10.0+1592+61442852
- python-nose Rocky Linux 8 1.3.7-31.module+el8.10.0+1592+61442852
- python-nose Rocky Linux 8 1.3.7-31.module+el8.10.0+1910+234ad790
- python-nose Rocky Linux 8 1.3.7-31.module+el8.9.0+1531+a18208f5
- python-wheel Rocky Linux 8 1:0.31.1-3.module+el8.10.0+1592+61442852
rocky linux advisories RLSA-2025:8419
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-5629 updated cvss 4.7
python-pymongo: Out-of-bounds read in bson module
-
Red Hat Enterprise Linux 8 python2-bson, python3-bson, python-pymongo, python2-pymongo, python3-pymongo, python2-pymongo-gridfs, +1 more Red Hat OpenStack Platform 16.1 python3-panko, openstack-panko-api, openstack-panko-common Red Hat OpenStack Platform 16.2 python3-panko, openstack-panko-api, openstack-panko-common Red Hat OpenStack Platform 17.1 python3-bson, python3-pymongoaffected: workaround, no fix available “Fix deferred”
-
Red Hat Enterprise Linux AppStream (v. 8) scipy 1.0.0-21.module+el8.10.0+20784+edafcd43, python36 3.6.8-39.module+el8.10.0+20784+edafcd43, python-nose 1.3.7-31.module+el8.10.0+20784+edafcd43, python3-bson 3.7.0-2.module+el8.10.0+23071+07f1d18e, python-distro 1.4.0-2.module+el8.10.0+20784+edafcd43, python-wheel 0.31.1-3.module+el8.10.0+20784+edafcd43, +19 morefixed: vendor fix RHSA-2025:8419
-
Red Hat Satellite 6 python-bson, python-pymongo, python-pymongo-gridfsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.66% chance of exploitation in the next 30 days, higher than 51% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:L |
| NVD | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H |
| OSV | 3.1 | 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:L |
| GitHub | 3.1 | 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:N/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pymongo | <4.6.3 |
4.6.3 |
Affected products
- MongoDB Inc PyMongo
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
References
-
jira.mongodb.org
/browse/PYTHON-4305
release-notes, web, issue-tracking, patch, third-party-advisory
-
github.com
/mongodb/mongo-python-driver/commit/56b6b6dbc267d365d97c037082369dabf37405d2
web
-
lists.debian.org
/debian-lts-announce/2024/06/msg00007.html
web, third-party-advisory
- lists.debian.org /debian-lts-announce/2024/09/msg00032.html
-
nvd.nist.gov
/vuln/detail/CVE-2024-5629
advisory
-
gist.github.com
/keltecc/62a7c2bf74a997d0a7b48a0ff3853a03
web
-
github.com
/mongodb/mongo-python-driver
package
-
security.snyk.io
/vuln/SNYK-PYTHON-PYMONGO-6370597
web
-
pypi.org
/project/pymongo
package
-
github.com
/advisories/GHSA-m87m-mmvp-v9qm
advisory
Sources
- CVE List CVE-2024-5629
- GitHub Advisory GHSA-m87m-mmvp-v9qm
- NVD CVE-2024-5629
- OSV PYSEC-2026-1826
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.