Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pymongo
  4. ›
  5. CVE-2024-5629

CVE-2024-5629: PyMongo Out-of-bounds Read in the bson module

June 5, 2024

Versions of the package pymongo before 4.6.3 are vulnerable to Out-of-bounds Read in the bson module. Using the crafted payload the attacker could force the parser to deserialize unmanaged memory. The parser tries to interpret bytes next to buffer and throws an exception with string. If the following bytes are not printable UTF-8 the parser throws an exception with a single byte.

References

  • gist.github.com/keltecc/62a7c2bf74a997d0a7b48a0ff3853a03
  • github.com/advisories/GHSA-m87m-mmvp-v9qm
  • github.com/mongodb/mongo-python-driver/commit/56b6b6dbc267d365d97c037082369dabf37405d2
  • jira.mongodb.org/browse/PYTHON-4305
  • nvd.nist.gov/vuln/detail/CVE-2024-5629
  • security.snyk.io/vuln/SNYK-PYTHON-PYMONGO-6370597

Code Behaviors & Features

Detect and mitigate CVE-2024-5629 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.6.3

Fixed versions

  • 4.6.3

Solution

Upgrade to version 4.6.3 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read

Source file

pypi/pymongo/CVE-2024-5629.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:27 +0000.