Use-after-free in MongoDB Java Driver reactive encryption can terminate application processes

What is CVE-2026-88032?

CVE-2026-88032 is a vulnerability classified as Use After Free, affecting Java Driver (affected versions: 4.2.0 – < 5.11.1), org.mongodb:mongodb-crypt Maven package (affected versions: 1.4.0 – < 5.11.1), and org.mongodb:mongodb-driver-reactivestreams Maven package (affected versions: 4.6.0 – < 5.11.1). This vulnerability is rated High, with a CVSS score of 8.2. Current sources do not report this vulnerability as exploited.

Overview

Original source data

A use-after-free in the reactive client-side encryption component of the MongoDB Java Driver can cause native resources to be freed while an affected encrypted operation is still using them when the operation is cancelled. A party able to cause such an operation to be cancelled may cause the hosting application process to terminate. Reaching the issue requires an affected reactive encryption configuration that retrieves KMS credentials on demand.

Affected products and scope

  • MongoDB Java Driver: releases from 4.2.0 through versions less than 5.11.1 are marked affected. The default status is unaffected outside this range.
  • org.mongodb:mongodb-crypt Maven package: releases from 1.4.0 through versions less than 5.11.1 are marked affected. The default status is unaffected outside this range.
  • org.mongodb:mongodb-driver-reactivestreams Maven package: releases from 4.6.0 through versions less than 5.11.1 are marked affected. The default status is unaffected outside this range.
  • The MongoDB issue record lists 5.11.1 as its fix version. It also describes driver-kotlin-coroutine and driver-scala as transitively exposed and driver-sync as not affected; exact version boundaries for those paths are not present in the normalized affected data.

Technical details

The MongoDB Java Driver reactive client-side encryption path holds a native libmongocrypt context for the duration of an encrypted operation. When the operation is cancelled, cleanup may free that context from doFinally while another thread is still executing a state-machine step; that step can then write to freed native memory. This is a CWE-416 use-after-free that can cause a JVM crash or corrupt data in the component holding encryption keys, according to the MongoDB issue record. Reaching the issue requires an affected reactive encryption configuration that retrieves KMS credentials on demand. The issue record gives client disconnects and operation timeouts as examples of cancellation, but the supplied CVE record does not fully specify the external mechanism used to force cancellation. The vendor issue also expands the technical scope to other callbacks on MongoCryptContextImpl, rather than only one KMS credential provision call.

Exploitability

  • The issue is network-reachable; the normalized record describes no authentication or user interaction requirement, but the affected reactive encryption configuration and on-demand KMS credential retrieval are still required.
  • Exploitation requires an encrypted operation to be cancelled while native resources are still in use. The MongoDB issue record gives client disconnect and operation timeout as examples of cancellation mechanisms.
  • The vendor issue record reports reproduction in a Spring Boot WebFlux service after an aborted HTTP request. This demonstrates reproducibility, not confirmed exploitation in the wild.
  • The supplied record marks public exploit as false and does not identify known exploitation or a ransomware campaign. That does not exclude activity that has not been reported.

Technical impact

The flaw can terminate the hosting application process when a native operation continues using a context that has already been freed. The direct technical impact is service interruption and possible failure of encrypted requests in progress. The normalized record does not establish data reading, data modification, or privilege escalation; the documented impact is focused on availability of the affected process. Exposure is limited by the requirement for reactive encryption with on-demand KMS credential retrieval. The MongoDB issue record additionally describes possible corruption in the component holding encryption keys, but the supplied evidence does not confirm an actual breach or loss of confidentiality.

Business impact

The primary consequence is loss of availability when the hosting process terminates during an encrypted operation. Affected services may drop in-flight requests and require normal process recovery; that is a likely operational consequence, not evidence of data loss. The MongoDB issue record reports a reproduced crash in a Spring Boot WebFlux service after an aborted HTTP request and notes possible native-memory corruption in the encryption component. The normalized CVE record itself confirms possible process termination, but does not confirm a data breach or disclosure. The supplied evidence does not establish an impact to confidentiality or integrity.

Remediation

  1. Upgrade: move the MongoDB Java Driver, org.mongodb:mongodb-crypt, and org.mongodb:mongodb-driver-reactivestreams to 5.11.1, the fix version supported by the affected data and the MongoDB issue record. Confirm that this release is compatible with each application's dependency graph.
  2. Verify dependency resolution after the upgrade so the runtime uses the fixed artifacts and does not retain an older artifact through a transitive dependency.
  3. If an upgrade cannot be completed immediately, remove the on-demand KMS credential retrieval configuration or provide credentials explicitly where operationally appropriate. The vendor issue states that explicit credentials reduce the widest exposure window but do not eliminate narrower windows, so this is not a complete fix.
  4. If the business function permits, temporarily disable the related reactive encrypted operations to remove the stated configuration precondition. This is a containment measure that may reduce functionality, not a replacement for the fix.
  5. After the change, run a regression test that cancels an operation during encryption and confirms that the process remains alive. The issue record calls for cancellation testing mid-operation and coverage of all related native calls.

Detection

  1. Inventory the resolved dependency tree and runtime versions for the MongoDB Java Driver, org.mongodb:mongodb-crypt, and org.mongodb:mongodb-driver-reactivestreams, rather than checking only direct build declarations.
  2. Identify applications using reactive client-side encryption, especially configurations that retrieve KMS credentials on demand, such as an empty provider document combined with kmsProviderPropertySupplier.
  3. Review telemetry for client disconnects, operation timeouts, or cancellations occurring alongside encrypted operations. These are relevant conditions, not unique indicators of compromise.
  4. Check for process exits, JVM crashes, and native crashes near cancelled operations. A failure in mongocrypt_ctx_provide_kms_providers is a correlation signal named by the vendor issue, but it is not a unique IOC.
  5. Review applications using the Kotlin coroutine or Scala drivers transitively, since the vendor issue describes those paths as potentially affected. The absence of log or crash evidence does not prove safety.
Sources (5)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.

Explore CyStack VulnScan
CyStack VulnScan dashboard