CVE-2021-20331
MongoDB C# Driver may publish events containing authentication-related data to a command listener configured by an application
- 4.2MediumCVSS base score
- 0.62%Exploitation in 30 daysEPSS · top 50% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By mongodb
- 5 months later
· 5 months later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
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 (11 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.
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
References1
- 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)
- EUVD EUVD-2022-4730 (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://cveledger.app/cve/CVE-2021-20331)Record last updated .