Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pymongo
  4. ›
  5. GHSA-cr6f-gf5w-vhrc

GHSA-cr6f-gf5w-vhrc: PyMongo Out-of-bounds Read in the bson module

April 6, 2024 (updated 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.

This advisory was initially published as CVE-2024-21506, which has since been rejected as a duplicate of CVE-2024-5629.

References

  • gist.github.com/keltecc/62a7c2bf74a997d0a7b48a0ff3853a03
  • github.com/advisories/GHSA-cr6f-gf5w-vhrc
  • github.com/mongodb/mongo-python-driver
  • github.com/mongodb/mongo-python-driver/commit/56b6b6dbc267d365d97c037082369dabf37405d2
  • nvd.nist.gov/vuln/detail/CVE-2024-21506
  • security.snyk.io/vuln/SNYK-PYTHON-PYMONGO-6370597

Code Behaviors & Features

Detect and mitigate GHSA-cr6f-gf5w-vhrc 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 5.2 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-125: Out-of-bounds Read

Source file

pypi/pymongo/GHSA-cr6f-gf5w-vhrc.yml

Spotted a mistake? Edit the file on GitLab.

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

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