LiveActive security incident?Get immediate response
CVE Record

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.

MediumCVSS 4.2Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This is a conditional data exposure issue in the MongoDB C# Driver. Affected applications can accidentally send authentication-related command data to an application-configured command listener, which could then be logged. The feature is not enabled by default, so exposure depends on local application configuration.

Executive priority

Prioritize review for systems handling privileged MongoDB access or centralized logging. This is not a broad remote compromise issue, but leaked authentication-related data can create follow-on security risk.

Technical view

MongoDB C# Driver v2.12 versions up to and including 2.12.1 may publish events containing sensitive data for commands including saslStart, saslContinue, isMaster, createUser, and updateUser. The issue is CWE-200 and only arises when command listener functionality is enabled by the application.

Likely exposure

Most exposure is limited to applications using MongoDB C# Driver 2.12 through 2.12.1 with command listeners enabled, especially where listener output is written to logs or telemetry stores.

Exploitation context

The source bundle does not indicate active exploitation, and the CVE is not in KEV. The risk is primarily accidental credential or authentication data disclosure through local logging or monitoring paths.

Researcher notes

The important exposure condition is application-enabled command listening, not default driver behavior. Evidence supports confidentiality impact only; no integrity or availability impact is described in the provided sources.

Mitigation direction

  • Identify services using MongoDB C# Driver v2.12 through 2.12.1.
  • Disable command listeners where they are not operationally required.
  • Move affected applications to an unaffected driver version following MongoDB guidance.
  • Review logging and telemetry pipelines for sensitive command event data.
  • Treat any exposed authentication-related logs as sensitive material.

Validation and detection

  • Inventory application dependencies for MongoDB C# Driver versions.
  • Check whether command listener functionality is enabled in application configuration or code.
  • Review log sinks for saslStart, saslContinue, isMaster, createUser, or updateUser event data.
  • Confirm affected services no longer run driver versions through 2.12.1.
  • Verify sensitive command event contents are not emitted to logs.
Prepared
Confidence
high
Sources
3

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-200: Information exposure and cloud metadata lookup

Information exposure and SSRF weaknesses can make discovery, cloud metadata, and credential material review relevant. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-20331 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
4.2 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
2Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
4.2CVSS 3.1MediumCVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N0.63.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

4.2Medium
CVSS 3.1 vector shape for CVE-2021-20331Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
MongoDB Inc.MongoDB C# Driver2.12unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-200 · source CWE mapping

Exposure of Sensitive Information to an Unauthorized Actor

Exposure of Sensitive Information to an Unauthorized Actor represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.