MongoDB Python Driver Patched for Critical TLS Revocation Flaw

3 min read
Source: CVEs | Zero Wire | Cloudflare Radar
MongoDB Python Driver Patched for Critical TLS Revocation Flaw
Photo: CVEs | Zero Wire | Cloudflare Radar
TL;DR

MongoDB has released version 4.20.2 of its Python Driver to fix CVE-2026-135146, a critical vulnerability in optional TLS certificate revocation checking. The flaw allowed unauthenticated network attackers to bypass revocation checks using a revoked but still-dated certificate, potentially exposing application credentials and session data. The issue affects versions 3.11.0 through 4.20.1 and is rated 9.1 Critical by MongoDB.

Key points

  • CVE-2026-135146 affects the MongoDB Python Driver (PyMongo) versions 3.11.0 up to but not including 4.20.2.
  • The vulnerability exists in the optional TLS revocation-checking support, specifically regarding the validation of stapled OCSP responses.
  • An attacker operating a network endpoint with a revoked but valid-dated certificate trusted by the client could have the connection accepted, leading to unintended disclosure of credentials and session data.
  • MongoDB scored the vulnerability as 9.1 Critical under CVSS 4.0, while NVD’s secondary score is 7.4 High under CVSS 3.1.
  • The fix is available in PyMongo version 4.20.2, which follows the 4.20.1 security release that addressed other CVEs.
  • The flaw is classified as CWE-299, Improper Check for Certificate Revocation, and requires no user interaction or privileges to exploit.

Background

This incident follows a pattern of recent security fixes in the PyMongo driver, including CVE-2026-96747, a medium-severity SSRF flaw fixed in version 4.18.2 in September 2026. The current vulnerability specifically targets the optional OCSP/CRL revocation checking feature, which is not enabled by default but activates when users install the driver with the 'pymongo[ocsp]' extra. For MongoDB Server v4.4+, the server staples time-stamped OCSP responses to certificates, a mechanism this CVE exploits through improper validation. Upgrading to 4.20.2 may require code adjustments due to breaking changes introduced in the 4.20 series, such as the removal of deprecated query types and text_opts parameters.

Why it matters

The vulnerability poses a significant risk to applications using PyMongo with optional TLS revocation checking, as it allows attackers to intercept connections and steal sensitive data like credentials. With a CVSS 4.0 score of 9.1, it is considered critical, and the ease of exploitation (low complexity, no privileges required) makes it a high-priority patch. Users who opted into OCSP/CRL checking are particularly vulnerable, as the flaw undermines the security benefit of revocation checking.

What to watch

Users of the MongoDB Python Driver should upgrade to version 4.20.2 to mitigate CVE-2026-135146. Those using versions 3.11.0 through 4.20.1 are advised to update promptly, especially if they have enabled optional TLS revocation checking. Developers should review their code for compatibility with the 4.20 series, as breaking changes may require adjustments. Monitoring for any public exploits or further advisories from MongoDB is recommended, though no active exploitation has been reported in the sources.

Share this article

Want the full story? Read the original reporting

Read on CVEs | Zero Wire | Cloudflare Radar