# CVE-2026-81523: MongoDB libmongocrypt input validation bypass in automatic encryption

Source: https://junglewise.ai/threats/cve-2026-81523-mongodb-libmongocrypt-input-validation-bypass-in-automatic  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-27. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-81523 · Severity: medium · CVSS 4.4 · Published 2026-08-27

MongoDB's libmongocrypt library, used to secure sensitive data in applications, fails to validate database identifiers supplied during automatic encryption setup. An attacker or misconfigured application could provide a crafted database name that bypasses validation, leading to incorrect encryption schema selection and potential unauthorized access or modification of encrypted application data.

Technologies: [MongoDB Libmongocrypt](https://junglewise.ai/threats/technologies/libmongocrypt). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb).

## Quick answers

**Is CVE-2026-81523 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-81523 being exploited in the wild.

**How severe is CVE-2026-81523?** Medium severity, with a CVSS score of 4.4, published 27 August 2026.

**Which products and versions are affected?** MongoDB Libmongocrypt prior to 1.20.3 and 1.21.0.

**Is there a fix for CVE-2026-81523?** A patch was published on 2026-08-27: Fixed in libmongocrypt 1.20.3 and 1.21.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-81523 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-81523?** Check whether you run MongoDB Libmongocrypt at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A missing input-validation vulnerability exists in MongoDB libmongocrypt's automatic-encryption context initialization. The library accepts caller-supplied database identifiers without sanitization, specifically failing to reject database names containing dots (.) or embedded NUL bytes. This allows an attacker to specify an invalid database name that causes the library to select an incorrect encryption schema, potentially leading to data encrypted with the wrong key or schema. The vulnerability is exploitable by any code that calls the affected libmongocrypt API with untrusted database identifier input. MongoDB released patches in versions 1.20.3 and 1.21.0 that validate database and collection names against prohibited characters.

## Affected products

- MongoDB libmongocrypt prior to 1.20.3 and 1.21.0

## Timeline

- 2026-08-27: disclosed: CVE-2026-81523 published
- 2026-08-27: patched: Fixed in libmongocrypt 1.20.3 and 1.21.0

## References

- [https://github.com/mongodb/libmongocrypt/releases/tag/1.20.3](https://github.com/mongodb/libmongocrypt/releases/tag/1.20.3)
- [https://jira.mongodb.org/browse/MONGOCRYPT-977](https://jira.mongodb.org/browse/MONGOCRYPT-977)

## Related threats

- [libmongocrypt out-of-bounds write in key-management request builder](https://junglewise.ai/threats/cve-2026-126792-a-memory-safety-flaw-in-the-key-management-request-building)
- [libmongocrypt KMS request injection in key vault processing](https://junglewise.ai/threats/cve-2026-114655-libmongocrypt-builds-requests-to-external-key-management)
- [MongoDB libmongocrypt state management memory corruption](https://junglewise.ai/threats/cve-2026-106433-improper-state-management-in-mongodb-libmongocrypt-can-cause)
- [MongoDB Crypt key vault privilege escalation to Google Cloud KMS](https://junglewise.ai/threats/cve-2026-84962-mongodb-crypt-key-vault-privilege-escalation-to-google-cloud-kms)
- [MongoDB libmongocrypt denial of service via undersized encrypted payload](https://junglewise.ai/threats/cve-2026-84971-mongodb-libmongocrypt-denial-of-service-via-undersized-encrypted)
