CVEBrief

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.

Exploited in the wild
Not in CISA KEV
KEV 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
Exploit odds (EPSS)
0.62% in 30 days
higher than 51% of CVEs; FIRST, December 2, 2026

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?

VendorProductAffectedFixed or not affected from
MongoDB Inc.MongoDB C# Driverfrom 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?

EcosystemPackageAffectedFixed inAdvisory
NuGetmongodb.driver>= 2.11.0, < 2.12.22.12.2GHSA-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?

VendorProductVersionsType
mongodbc\# driverfrom 2.12.0 before 2.12.2application
mongodbc\# driver2.11.0application

NVD analysis (status Modified), last modified June 17, 2026, 03:33 UTC.

How severe is CVE-2021-20331?

ScoreVersionVectorSource
Medium 4.2CVSS 3.1CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:Nmongodb
Medium 4.9CVSS 3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:NNVD
Low 3.5CVSS 2.0AV:N/AC:M/Au:S/C:P/I:N/A:NNVD

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?

Where are the vendor advisories and references?

Who found and reported it?

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?

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.