# CVE-2026-81522: MongoDB C++ Driver namespace validation bypass

Source: https://junglewise.ai/threats/cve-2026-81522-mongodb-c-driver-namespace-validation-bypass  
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-81522 · Severity: high · CVSS 8.1 · Published 2026-08-27

MongoDB's C++ database driver fails to properly validate database and collection names supplied by applications, allowing special characters to redirect database operations to unintended targets. An attacker who can control the names passed to the driver (via untrusted application input) could read or write data from another tenant's database, potentially exposing sensitive information or modifying business records.

Technologies: [MongoDB C Driver](https://junglewise.ai/threats/technologies/c-driver). Vendors: [MongoDB](https://junglewise.ai/threats/vendors/mongodb).

## Quick answers

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

**How severe is CVE-2026-81522?** High severity, with a CVSS score of 8.1, published 27 August 2026.

**Which products and versions are affected?** MongoDB C Driver before 4.5.1.

**Is there a fix for CVE-2026-81522?** A patch was published on 2026-08-27: Fix released in version 4.5.1 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-81522 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-81522?** Check whether you run MongoDB C Driver 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

The MongoDB C++ Driver has an input validation weakness in its handling of namespace identifiers (database and collection names). The driver fails to reject special characters, particularly "." (dot) and NUL bytes, which can be embedded in caller-supplied namespace strings. When an application constructs a namespace from untrusted input without additional validation, an attacker can inject these characters to cause the driver to silently reinterpret the intended database or collection and route operations to a different logical tenant's data. The fix, released in version 4.5.1, adds validation to reject "." in database names and NUL bytes in both database and collection names before transmission to the server.

## Affected products

- MongoDB C++ Driver before 4.5.1

## Timeline

- 2026-08-27: disclosed
- 2026-08-27: patched: Fix released in version 4.5.1

## References

- [https://github.com/mongodb/mongo-cxx-driver/releases/tag/r4.5.1](https://github.com/mongodb/mongo-cxx-driver/releases/tag/r4.5.1)
- [https://jira.mongodb.org/browse/CXX-3552](https://jira.mongodb.org/browse/CXX-3552)

## Related threats

- [MongoDB C# Driver BSON type allow-list bypass](https://junglewise.ai/threats/cve-2026-126982-a-type-allow-list-bypass-in-the-bson-serialization-library-of)
- [MongoDB C Driver namespace field validation bypass](https://junglewise.ai/threats/cve-2026-120956-the-mongodb-c-driver-does-not-validate-the-type-or-format-of-a)
- [MongoDB C Driver GridFS file download denial of service](https://junglewise.ai/threats/cve-2026-120955-the-gridfs-file-download-api-in-the-mongodb-c-driver-does-not)
- [MongoDB C Driver memory-initialization flaw in GridFS](https://junglewise.ai/threats/cve-2026-120684-a-memory-initialization-flaw-in-the-legacy-gridfs-file-handling)
- [MongoDB C Driver memory leak in compressed responses](https://junglewise.ai/threats/cve-2026-120678-a-memory-management-flaw-in-the-mongodb-c-driver-s-handling-of)
