KMS master key exposure via unredacted credential serialization in driver settings string
Medium5.6CVE-2026-81530 · Published Aug 27, 2026
### Impact A weakness in the client-side encryption configuration surface of the MongoDB C# Driver causes sensitive key-management credential material supplied by the application to be reproduced verbatim in the driver's human-readable diagnostic representation of its client settings, instead of being masked as other secret fields are. A party able to read the application's logs, diagnostic output, or a process memory dump may thereby recover the plaintext credentials and use them to decrypt protected field data. ### Patches Fixed in 3.11.1. Key-management provider configuration is now masked in the driver's diagnostic representation of its client settings, as other secret fields already were. ### Workarounds Where the key provider supports it, configure the driver to obtain credentials on demand from the hosting environment rather than supplying them directly, so they never enter the settings object. Otherwise, avoid logging or serializing client settings objects. Upgrading does not undo prior exposure. Scrub credentials already written to logs and rotate any that may have been recorded. ### References [CSHARP-6164](https://jira.mongodb.org/browse/CSHARP-6164), [Fix](https://g...
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| MongoDB.Driver NuGet | >= 2.10.0, < 3.11.1 | 3.11.1 |
Details and references
### Impact A weakness in the client-side encryption configuration surface of the MongoDB C# Driver causes sensitive key-management credential material supplied by the application to be reproduced verbatim in the driver's human-readable diagnostic representation of its client settings, instead of being masked as other secret fields are. A party able to read the application's logs, diagnostic output, or a process memory dump may thereby recover the plaintext credentials and use them to decrypt protected field data. ### Patches Fixed in 3.11.1. Key-management provider configuration is now masked in the driver's diagnostic representation of its client settings, as other secret fields already were. ### Workarounds Where the key provider supports it, configure the driver to obtain credentials on demand from the hosting environment rather than supplying them directly, so they never enter the settings object. Otherwise, avoid logging or serializing client settings objects. Upgrading does not undo prior exposure. Scrub credentials already written to logs and rotate any that may have been recorded. ### References [CSHARP-6164](https://jira.mongodb.org/browse/CSHARP-6164), [Fix](https://github.com/mongodb/mongo-csharp-driver/commit/242a7d1b2361f939fdc457aa58bb796be9226990), [CVE](https://www.cve.org/CVERecord?id=CVE-2026-81530)
- CVSS 3.1
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-532
More MongoDB advisories
All MongoDB| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Aug 27 | NoSQL injection via array replacement bypassing update shape validation in driver write path | Medium5.4 | 3.11.1 |
| Aug 27 | NoSQL injection in LINQ pipeline translation | Medium6.5 | 3.11.1 |
| Aug 27 | Connection-option injection via unescaped settings in the canonical MongoDB URL builder | High7.1 | 3.11.1 |
| Aug 27 | Cross-tenant database retargeting via dot/NUL injection in namespace strings in the PHP Driver | High8.1 | 1.21.4+1 more |
| Aug 27 | Cross-database write retargeting via unvalidated dotted database name in Client.BulkWrite | High7.1 | 2.8.2 |
| Aug 27 | Cross-database write redirection via unvalidated dotted database name in bulk write namespaces | Medium6.5 | 3.8.2 |