Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
High 8.2CVE-2026-135898

MongoDB Python Driver – out-of-bounds read in BSON array decoding

Published 25/11/2026 · Updated 25/11/2026 · MongoDB Python Driver

Summary

The native C BSON decoding extension of the MongoDB Python Driver (PyMongo) contains an out-of-bounds read (CWE-125) when decoding BSON arrays. Versions from 1.9.0 up to, but not including, 4.20.2 are affected.

Per the CVSS vector (score 8.2, high), the attack is network-based, low complexity, and requires no authentication or user interaction. The attacker only needs to be able to supply crafted BSON data to the decoder.

The result is termination of the application process (denial of service, high availability impact). In some configurations, nearby process memory may be included in error messages, leading to limited unintended data disclosure. It is not listed in the CISA KEV catalog.

Who is affected

Organizations developing or running Python applications that use the MongoDB Python Driver (versions 1.9.0 – < 4.20.2) with the C extension, especially those processing BSON data from untrusted sources.

What to do

  1. Upgrade the MongoDB Python Driver (pymongo) to version 4.20.2 or later.
  2. Inventory all applications, virtual environments and container images and check the installed version (e.g. pip show pymongo).
  3. Determine whether applications decode BSON data from untrusted sources and restrict such input until upgraded.
  4. Ensure error messages are not returned to users or logged where unauthorized parties can access them.
  5. Follow the vendor advisory (https://jira.mongodb.org/browse/PYTHON-6256) for further details.

Affected products and versions

MongoDB Python Driver1.9.0 – < 4.20.2Fixed in: 4.20.2

CVSS vector, explained

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

Attack vector
Network (from the internet)
Attack complexity
Low
Privileges required
None (no login)
User interaction
Not required
Scope
Vulnerable component only
Confidentiality
Low impact
Integrity
None
Availability
High impact

Weakness type (CWE)

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.