CVE-2021-20331

MongoDB C# Driver may publish events containing authentication-related data to a command listener configured by an application

MEDIUM
4.9
CVSS Score
Published: May 13, 2021 at 07:40 AM UTC
Updated: June 17, 2026 at 03:33 AM UTC
1 product affected across 1 vendorC++ Driver

Using MongoDB C# Driver by MongoDB Inc.?

Get instant alerts when new vulnerabilities affect MongoDB C# Driver - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.9
Exploit prediction
EPSS 0.6%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

2.12 ≤ v ≤ 2.12.12.12.0 ≤ v < 2.12.22.11.02.12
Affected range stops below 2.12.2, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

Patch and advisory references

References (1)

x_refsource_CONFIRMIssue TrackingPatchVendor Advisory
https://jira.mongodb.org/browse/CSHARP-3521

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
HIGH
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-200

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card