CVE-2021-20331
MongoDB C# Driver may publish events containing authentication-related data to a command listener configured by an application
- Published
- Updated
- Reserved
- Assigned by
- mongodb
Description
Specific versions of the MongoDB C# Driver may erroneously publish events containing authentication-related data to a command listener configured by an application. The published events may contain security-sensitive data when commands such as "saslStart", "saslContinue", "isMaster", "createUser", and "updateUser" are executed. Without due care, an application may inadvertently expose this authenticated-related information, e.g., by writing it to a log file. This issue only arises if an application enables the command listener feature (this is not enabled by default). This issue affects the MongoDB C# Driver v2.12 versions prior to and including 2.12.1.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| mongodbCNA (assigner) | 3.1 | Medium4.2 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N |
| NVDNVD · Modified | 3.1 | Medium4.9 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N |
- EPSS (exploitation in 30 days)
- 0.62% · top 50% of all CVEs (5 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.2.
Weakness
Affected products
MongoDB Inc. · MongoDB C# Driver
- affected 2.12 – ≤ 2.12.1
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- NuGetmongodb.driverGHSA-p9rv-qgqw-jx2w (opens in a new tab)
References (1)
- https://jira.mongodb.org/browse/CSHARP-3521 (opens in a new tab)x_refsource_CONFIRMx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-p9rv-qgqw-jx2w (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2021-20331)Record last updated .