Out-of-bounds Read Affecting pymongo package, versions [3.9.0,4.18.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.09% (1st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYMONGO-21756829
  • published27 Oct 2026
  • disclosed27 Oct 2026
  • creditUnknown

Introduced: 27 Oct 2026

NewCVE-2026-106435  (opens in a new tab)
CWE-125  (opens in a new tab)

How to fix?

Upgrade pymongo to version 4.18.3 or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Read via unbounded strlen scans in the BSON Regex element parser in bson/_cbsonmodule.c. When decoding a BSON document containing a Regex element, the C extension uses strlen to locate the NUL terminator of the pattern and flags strings without bounding the search to the remaining document bytes. An attacker who can supply a malformed BSON document without an embedded NUL can cause the parser to read beyond the document buffer, crashing the process.

CVSS Base Scores

version 4.0
version 3.1