Home / MongoDB Inc. / MongoDB C# Driver / CVE-2021-20331
CVE-2021-20331: is it exploited, and which versions of MongoDB Inc. MongoDB C# Driver are affected and fixed?
CVE-2021-20331 is an information disclosure vulnerability in MongoDB Inc. MongoDB C# Driver. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 10:08 UTC). Affected: mongodb.driver from 2.11.0 before 2.12.2 (GitHub advisory GHSA-p9rv-qgqw-jx2w). Fixed in 2.12.2 (GitHub advisory GHSA-p9rv-qgqw-jx2w). Severity: Medium (4.2, CVSS 3.1, from mongodb).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 10:08 UTC, CVE record November 19, 2026, 07:15 UTC and NVD November 19, 2026, 07:58 UTC.
What is CVE-2021-20331?
MongoDB C# Driver may publish events containing authentication-related data to a command listener configured by an application
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.
From the CVE record by mongodb, last updated September 16, 2024, 22:25 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| MongoDB Inc. | MongoDB C# Driver | from 2.12 through 2.12.1 |
As the CVE record by mongodb states it, last updated September 16, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| NuGet | mongodb.driver | >= 2.11.0, < 2.12.2 | 2.12.2 | GHSA-p9rv-qgqw-jx2w |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated January 23, 2024. Summary: MongoDB C# Driver Risk of Exposing Authentication Data via Command Listener.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| mongodb | c\# driver | from 2.12.0 before 2.12.2 | application |
| mongodb | c\# driver | 2.11.0 | application |
NVD analysis (status Modified), last modified June 17, 2026, 03:33 UTC.
How severe is CVE-2021-20331?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 4.2 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N | mongodb |
| Medium 4.9 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N | NVD |
| Low 3.5 | CVSS 2.0 | AV:N/AC:M/Au:S/C:P/I:N/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2021-20331 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: partial (CISA ADP, January 23, 2024)
- EPSS
- 0.62% probability of exploitation activity in the next 30 days, percentile 51.3 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
Where are the vendor advisories and references?
- https://jira.mongodb.org/browse/CSHARP-3521 x_refsource_CONFIRM
Who found and reported it?
- Citrix Systems, Inc. (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- December 17, 2020
- Published
- May 13, 2021, 07:40 UTC
- CVE record updated
- September 16, 2024, 22:25 UTC by mongodb
- NVD
- Modified, last modified June 17, 2026, 03:33 UTC
- Last checked
- CVE list November 19, 2026, 07:15 UTC; NVD November 19, 2026, 07:58 UTC; KEV December 3, 2026, 10:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect MongoDB C# Driver?
- May 6, 2026CVE-2026-6691 MongoDB Inc. MongoDB C Driver: buffer overflow
- Mar 17, 2026CVE-2026-4359 MongoDB Inc MongoDB C Driver: improper Neutralization of Null Byte or NUL Character
- Aug 7, 2024CVE-2024-7553 MongoDB Inc MongoDB Server: improper access control
- Jan 12, 2024CVE-2023-0437 MongoDB Inc MongoDB C Driver: infinite loop (denial of service)
- Aug 29, 2023CVE-2021-32050 MongoDB Inc MongoDB C Driver: information disclosure
Every CVE in MongoDB C# Driver
Questions about CVE-2021-20331
Is CVE-2021-20331 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 10:08 UTC. FIRST's EPSS gives it a 0.62% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of MongoDB Inc. MongoDB C# Driver are affected by CVE-2021-20331?
mongodb.driver from 2.11.0 before 2.12.2, per the GitHub advisory GHSA-p9rv-qgqw-jx2w. The tables above give every range the sources list.
Which version fixes CVE-2021-20331?
2.12.2, per the GitHub advisory GHSA-p9rv-qgqw-jx2w. Check the vendor's advisory before you rely on it.
How severe is CVE-2021-20331?
Medium (4.2, CVSS 3.1, from mongodb). The severity table above shows each score with its source.
Where is the official record of CVE-2021-20331?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.