MongoDB libmongocrypt: Heap corruption via duplicate masterKey fields
Summary
MongoDB libmongocrypt, a C library used for client-side field-level encryption and Queryable Encryption, mishandles provider-specific data when cleaning up a key document with duplicate masterKey fields. An authenticated actor who can modify key vault documents, or a server that returns such a key document, can cause invalid memory access and invalid frees in the client process. Successful exploitation can terminate the application or corrupt process memory.
Affected
- MongoDB libmongocrypt 1.1.0 to before 1.20.5 (according to secondary aggregators; the vendor data was not independently confirmed)
- Versions before 1.1.0: Unknown.
Fixed in
- Version 1.20.5 (fix version listed in the MongoDB Jira ticket MONGOCRYPT-964)
- Note: GHSA-7mvq-mg47-m88j (CVE-2026-114655, a separate issue) has patched versions 1.21.1 and later.
Workaround
- No vendor workaround documented.
- Until patched: limit write access to the key vault collection and check which hosts or servers your applications trust to return key documents (recommendation, not from a vendor source).
Exploitation
- Not known to be exploited. CISA SSVC: Exploitation none, Automatable no, Technical Impact total.
- EPSS was about 0.27% at last check.
- No public proof of concept found. The fix commit is public, so the patch reveals the affected code path.
Our recommendation
- Identify applications and drivers that depend on libmongocrypt (check lockfiles and container images).
- Upgrade to libmongocrypt 1.21.1 or later, which covers this CVE and CVE-2026-114655.
- Limit who can write to the key vault collection.
- Check your distribution's package status, since Ubuntu and Debian still list the CVE as under evaluation.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- MongoDB Jira MONGOCRYPT-964 jira.mongodb.org
- libmongocrypt release 1.20.5 github.com
- libmongocrypt fix pull request 1236 github.com
- GHSA-7mvq-mg47-m88j (later advisory, patched 1.21.1) github.com
- MongoDB security alerts www.mongodb.com
- Ubuntu CVE tracker ubuntu.com
- Debian tracker libmongocrypt tracker.debian.org
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 05:14.
Original description (NVD)
Improper state management in MongoDB libmongocrypt can cause provider-specific data to be treated as an incompatible type when cleaning up a key document containing duplicate masterKey fields. An authenticated actor who can modify key vault documents, or a server that returns such a key document, can cause invalid memory access and invalid frees in the client process. This can terminate the application or corrupt process memory.
NVD references (1)
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
