Guide · Ilia Dubovskii · 26 November 2026

MongoDB C Driver OCSP responder check bypass (CVE-2026-135224): How to Check and Fix

CVE-2026-135224 is a certificate validation flaw in libmongoc, the MongoDB C Driver, in versions 1.18.0 to 1.30.16 and 2.0.0 to 2.5.9. When the driver checks whether a server's TLS certificate was revoked, it does not confirm that whoever signed the OCSP status response was allowed to answer for that certificate. A party that controls the endpoint a client connects to, and holds a certificate the issuer has already revoked, can present its own "good" answer and have the revoked certificate accepted, exposing the application's database traffic. MongoDB fixed it in C Driver 1.30.17 and 2.5.10 on 25 November 2026, and in PHP extension releases 2.5.9, 2.1.15 and 1.21.15 the same day. MongoDB scores it 9.3 Critical under CVSS 4.0. No exploitation has been reported and it is not in CISA's KEV catalogue.

The short version

1. What CVE-2026-135224 is

libmongoc is the C library behind MongoDB's C, C++ and PHP drivers. When it opens a TLS connection it verifies the server certificate, checks the hostname, and checks revocation through OCSP, the Online Certificate Status Protocol. The server can staple an OCSP response to the handshake, or the driver fetches one from the responder URL in the certificate (C Driver TLS docs).

A valid OCSP response must be signed by the certificate's issuing CA or by a responder that CA has delegated. Until this fix, libmongoc's OpenSSL code verified the response with the OCSP_TRUSTOTHER flag, which tells OpenSSL to trust any signer certificate found in the chain the server itself supplied, without checking that the signer was authorised (fix commit, OpenSSL docs). The server operator controls that chain. An attacker who holds a revoked certificate for your database hostname, and can place a server where your client connects, adds a certificate of their own to the chain and a "good" response signed by it. The driver accepts the revoked certificate.

MongoDB says this "may result in unintended disclosure of the application's database traffic and in the loss of the revocation decision" (CVE record). The fix is 11 changed lines in mongoc-openssl.c: the flag is dropped and the signer must be the issuing CA or a delegated responder with the OCSP signing key usage, per RFC 6960. The commit landed on 24 November 2026 and shipped in both branches on 25 November. The ticket CDRIVER-6500, opened 9 October 2026, points to a private security ticket, so no further write-up exists. The same releases also fix CVE-2026-135222 and CVE-2026-135134, per the release notes.

2. Impact: who is exposed and how badly

This is a man-in-the-middle bug, not remote code execution. The attacker needs a revoked but otherwise valid certificate for your MongoDB hostname, which means a key that leaked and was reported, plus a network position where your client's connection lands on their server. Given both, they read and alter database traffic. Revocation is the defence that is supposed to work after a key leaks, and this bug removes it, which is why MongoDB rates confidentiality and integrity High and availability None.

Only TLS connections are affected, and only when the driver performs an OCSP check. MongoDB's docs say OCSP checking happens only when the server certificate carries an OCSP URL, and that OCSP is "fully supported" on OpenSSL but only partially on Windows Secure Channel and macOS Secure Transport (TLS docs). The fix touches only the OpenSSL code path; the advisory does not say whether native Windows or macOS builds are affected. Linux server builds use OpenSSL.

What you run Affected Fixed version
libmongoc 2.x2.0.0 to 2.5.92.5.10, 25 Nov 2026 (release)
libmongoc 1.x1.18.0 to 1.30.161.30.17, 25 Nov 2026 (release)
PHP extension mongodb 2.5.xbelow 2.5.92.5.9, bundles libmongoc 2.5.10 (release)
PHP extension mongodb 2.1.x and 1.21.xbelow 2.1.15 and 1.21.152.1.15 and 1.21.15, bundle libmongoc 1.30.17 (2.1.15, 1.21.15)
C++ driver mongocxxuses the system libmongocupgrade libmongoc; r4.6.2 needs 2.5.8 or later (release)
Debian sid libmongoc2-2, trixie libmongoc-1.0-0t64, bookworm libmongoc-1.0-02.5.9-1, 1.30.4-1+deb13u5, 1.23.1-1+deb12u3none yet (tracker)
Ubuntu 26.10, 26.04, 25.10, 24.04, 22.042.5.0-1, 2.2.2-1, 1.30.4-1ubuntu1, 1.26.0-1.1ubuntu2, 1.21.0-1build1none yet (Launchpad)
Alpine edge and 3.24, and 3.21 to 3.23 mongo-c-driver1.30.14-r0 and 1.27.1-r0none yet (Alpine packages)
Fedora 43, 44, 45 and EPEL 8, 9, 10earlier builds1.30.17-1 and 2.5.10-1 submitted 26 Nov 2026, pending (Bodhi)
Homebrew mongo-c-driver, mongo-c-driver@1earlier builds2.5.10 and 1.30.17 (formula, formula @1)

Debian 11 (1.17.6-1) and Ubuntu 20.04 (1.16.1-1build2) ship versions below 1.18.0, outside the affected range in the CVE record. Red Hat's CVE database and Amazon Linux's ALAS feed had no entry on 26 November 2026, and Ubuntu's CVE page was returning a 504 error.

Not affected: applications on MongoDB's Node.js, Python, Java, Go, Rust, C# or Ruby drivers, which do not use libmongoc. The MongoDB server, Atlas and mongosh are not affected. Clients without TLS have no certificate check to bypass, and clients that already set tlsDisableCertificateRevocationCheck=true had no revocation decision to lose.

3. How to check if you are affected

  1. Find libmongoc on a host. Debian and Ubuntu name the runtime package libmongoc-1.0-0 or libmongoc-1.0-0t64 for 1.x and libmongoc2-2 for 2.x (Debian sid, trixie). No distribution package has been rebuilt yet, so any hit below 1.30.17 or 2.5.10 means affected. The pkg-config module is libmongoc-1.0 for 1.x and mongoc2 for 2.x (CMake build file, PHP config.m4).
dpkg -l 'libmongoc*' 2>/dev/null | grep '^ii'
rpm -qa 'mongo-c-driver*'
apk list --installed 2>/dev/null | grep mongo-c-driver
brew list --versions mongo-c-driver mongo-c-driver@1 2>/dev/null
pkg-config --modversion libmongoc-1.0 2>/dev/null; pkg-config --modversion mongoc2 2>/dev/null
  1. PHP. PECL and PIE builds of the mongodb extension compile libmongoc in. php --ri mongodb prints the same information as phpinfo(), including a row named libmongoc bundled version (php.net CLI options, extension source). You want extension 2.5.9, 2.1.15 or 1.21.15 and libmongoc 2.5.10 or 1.30.17. An extension built with --with-mongodb-system-libs=yes uses the system library instead, so step 1 applies (PHP install docs).
php --ri mongodb | grep -i -E 'extension version|libmongoc'
  1. Container images. Run the same commands inside the image you deploy, and read the Dockerfile for the line that installs the extension or library. The official php images do not include the extension, so that line is yours.
docker run --rm <your-image> php --ri mongodb | grep -i libmongoc
grep -n -E 'pecl install mongodb|pie install mongodb|libmongoc|mongo-c-driver' Dockerfile
  1. Composer projects. composer.lock records only ext-mongodb as a platform requirement, not a version, so step 2 or 3 is the real check. If you install through PIE, the package is mongodb/mongodb-extension and 2.5.9 is on Packagist (Packagist).
  1. C and C++ applications. mongoc_get_version() returns the version as a string and the header defines MONGOC_VERSION_S (mongoc_get_version, version header). For a dynamically linked binary, step 1 applies.
  1. Kubernetes and AWS ECS. List the images every workload runs, then apply step 3 to each distinct image. A PHP Lambda runs on a custom runtime or layer; inspect that layer's build the same way.
kubectl get pods -A -o jsonpath='{range .items[*]}{.spec.containers[*].image}{"\n"}{end}' | sort -u
aws ecs describe-task-definition --task-definition <family> --query 'taskDefinition.containerDefinitions[*].image'
  1. Does the connection check OCSP at all? With tls=true and defaults, revocation checking is on; tlsDisableCertificateRevocationCheck=true turns it off (URI options). Upgrade either way.

4. How to fix it

  1. PHP, from PECL or PIE. Upgrade the extension to 2.5.9, or to 2.1.15 or 1.21.15 if you are held on an older branch (PECL). These commands change the system.
sudo pecl upgrade mongodb
pie install mongodb/mongodb-extension:2.5.9
php --ri mongodb | grep -i libmongoc
  1. PHP in a container. Pin the fixed version on the Dockerfile's install line, for example pie install mongodb/mongodb-extension:2.5.9 as in the release notes, rebuild and redeploy. Confirm with check step 3.
  1. libmongoc from source. Build 2.5.10 or 1.30.17 from the release tarballs (2.5.10, 1.30.17), then relink or restart every program that loads it. mongocxx users upgrade the C driver underneath; the C++ driver itself needs no change.
  1. Homebrew. brew upgrade mongo-c-driver or brew upgrade mongo-c-driver@1 installs 2.5.10 or 1.30.17 (formula). This changes the system.
  1. Debian, Ubuntu, Alpine. No fixed package existed on 26 November 2026. Watch the Debian tracker, Launchpad and Alpine packages. Until then, PECL or a source build is the route. Fedora and EPEL updates were pending in Bodhi; once stable, sudo dnf upgrade mongo-c-driver applies them.
  1. Restart. PHP-FPM, Apache, long-running workers and any C or C++ service must restart or redeploy before the fix is live. Repeat the check against the running process.

5. If you cannot patch today

MongoDB documents no workaround; the release notes and the CVE record give only the upgrade. Generic exposure cuts that follow from the bug's shape:

6. How to tell if you were already hit

Nothing is published. The CVE record, the release notes and the trackers we read give no indicators of compromise and no attack reports (OffSeq radar). A successful attack leaves no trace in the client; the connection looks like a normal TLS session. Evidence would be on the network side: DNS answers for the database hostname pointing somewhere unexpected, or application connections the database server never received. If you believe traffic was intercepted, assume the attacker read what the application sent, including database credentials, and rotate them.

7. How autonomous DevOps handles a bug like this

Check steps 3 and 6 above are inventory questions: which image each ECS task definition runs, and what each Dockerfile installs. Compass, Beamreach's open-source operations agent for AWS, keeps that map current, including apt-get install and apk add lines and whether the workload faces the internet (Compass). So "which containers install libmongoc from a distribution package" is a lookup on 26 November, not a sweep.

The fix is only partly the kind of change its patch pull requests make. MongoDB is not on Compass's default product list, but PHP is, and packages on the map are also matched through OSV by package URL, so a Debian, Ubuntu or Alpine libmongoc package is matched once those trackers carry a fix. At CVSS 9.3 the finding is above the 7.0 threshold and a pull request opens without a click. Today no distribution has a fixed package, so there is no OS package pin to change yet. A pecl install mongodb line is not a base image tag, OS package pin or lockfile dependency, so Compass does not edit it; that change, like a source build, is a person's job.

Compass does not watch processes in a container, so step 2, reading the version out of a running PHP, is not something it does. It covers AWS only, not Kubernetes clusters as such. Honeytokens do not help here: the attacker intercepts network traffic rather than running code inside the workload, so a decoy credential is never touched. For this bug the inventory answers "where is libmongoc", the pull request arrives when distributions ship a package, and the PECL bump is a person's five minutes (patching docs).

8. Sources

9. FAQ

Is my application affected by CVE-2026-135224?

Only if it uses libmongoc between 1.18.0 and 1.30.16 or between 2.0.0 and 2.5.9 and connects to MongoDB over TLS. In practice that means C and C++ applications and PHP applications with the mongodb extension below 2.5.9, 2.1.15 or 1.21.15. Run php --ri mongodb or check the installed libmongoc package. Applications on the Node.js, Python, Java, Go, Rust, C# or Ruby drivers are not affected.

Which version fixes CVE-2026-135224?

MongoDB C Driver 1.30.17 and 2.5.10, released 25 November 2026. For PHP, extension 2.5.9 bundles libmongoc 2.5.10, and 2.1.15 and 1.21.15 bundle 1.30.17. Homebrew has both fixed versions. Debian, Ubuntu and Alpine had no fixed package on 26 November 2026; Fedora and EPEL builds were pending.

Is CVE-2026-135224 being exploited?

Not as far as anyone has reported by 26 November 2026. It is not in CISA's Known Exploited Vulnerabilities catalogue, and CISA's SSVC assessment on the CVE record says exploitation none. The attack needs a revoked certificate for your database hostname plus a network position, which keeps it out of mass scanning.

Is there a workaround for the MongoDB C Driver OCSP bug?

No. MongoDB documents only the upgrade. Keeping the database on a private network and resolving its name from DNS you control narrows who can stage the attack. Do not disable certificate or revocation checks in the connection string as a response.

Does CVE-2026-135224 affect MongoDB Atlas or the MongoDB server?

No. The flaw is in the client library. A PHP or C application connecting to Atlas with an affected libmongoc would still accept a revoked certificate from an attacker between it and Atlas, so upgrade the client.

Last checked: 26 November 2026. Written from the vendor advisory and the CVE record, linked below. Confirm against the vendor advisory before acting.

Related: CVE Watch: all pages · How to protect against *2Shell vulnerabilities · Automated patching compared · AWS canary credentials