LiveActive security incident?Get immediate response
CVE Record

CVE-2021-20328: MongoDB Java driver client-side field level encryption not verifying KMS host name

Specific versions of the Java driver that support client-side field level encryption (CSFLE) fail to perform correct host name verification on the KMS server’s certificate. This vulnerability in combination with a privileged network position active MITM attack could result in interception of traffic between the Java driver and the KMS service rendering Field Level Encryption ineffective. This issue was discovered during internal testing and affects all versions of the Java driver that support CSFLE. The Java async, Scala, and reactive streams drivers are not impacted. This vulnerability does not impact driver traffic payloads with CSFLE-supported key services originating from applications residing inside the AWS, GCP, and Azure network fabrics due to compensating controls in these environments. This issue does not impact driver workloads that don’t use Field Level Encryption.

MediumCVSS 6.4Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

This issue can make MongoDB client-side field level encryption ineffective in narrow conditions. A vulnerable Java driver may fail to properly verify the KMS server certificate name, allowing a privileged network attacker to intercept KMS traffic. Systems not using Field Level Encryption are not affected.

Executive priority

Treat this as a targeted remediation for sensitive MongoDB Java applications using CSFLE. It is not broadly exploitable, but it can undermine encryption controls if an attacker controls the network path to KMS. Prioritize regulated or high-value data workloads first.

Technical view

CVE-2021-20328 is CWE-295 in MongoDB Java driver CSFLE support. Specific Java driver packages and versions fail correct hostname verification on KMS certificates. Combined with active MITM from a privileged network position, confidentiality and integrity of field-level encryption can be compromised. Java async, Scala, and reactive streams drivers are not impacted.

Likely exposure

Exposure is likely limited to applications using affected MongoDB Java driver versions with CSFLE enabled. Workloads without Field Level Encryption are not impacted. The source also states applications inside AWS, GCP, and Azure network fabrics using CSFLE-supported key services are not impacted due to compensating controls.

Exploitation context

The public bundle does not show active exploitation, and the CVE is not marked KEV. Exploitation requires an active man-in-the-middle position with privileged network access and user interaction per CVSS. This is serious where encryption protects sensitive fields across less-controlled network paths.

Researcher notes

The source bundle names MongoDB Java driver CSFLE hostname verification against KMS certificates and excludes Java async, Scala, and reactive streams drivers. Evidence does not include a patch version, public exploit, or KEV listing, so remediation should track MongoDB advisory guidance rather than assumed fixes.

Mitigation direction

  • Identify Java applications using MongoDB CSFLE and affected driver packages.
  • Check MongoDB JAVA-4017 and vendor guidance for fixed driver versions or workarounds.
  • Prioritize remediation for CSFLE workloads outside protected cloud network fabrics.
  • Avoid routing KMS traffic through untrusted or weakly controlled network paths.
  • Confirm async, Scala, or reactive streams drivers before excluding systems.

Validation and detection

  • Inventory MongoDB Java driver package names and versions in application dependencies.
  • Confirm whether each application enables client-side field level encryption.
  • Map KMS provider traffic paths and hosting environment for each affected application.
  • Verify whether workloads run inside AWS, GCP, or Azure network fabrics.
  • Review TLS/KMS connection validation findings against MongoDB advisory details.
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 · low confidence lookup

CWE-295: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. 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-20328 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
6.4 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/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
6.4CVSS 3.1MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N1.25.2Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

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

Vector: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/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.mongo-java-driver3.11, 3.12unaffected
MongoDB Inc.mongodb-driver3.11, 3.12unaffected
MongoDB Inc.mongodb-driver-sync4.2.0, 3.11, 3.12, 4.0, 4.1unaffected
MongoDB Inc.mongodb-driver-legacy4.2.0, 3.11, 3.12, 4.0, 4.1unaffected
Weakness

CWE details

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

CWE-295 · source CWE mapping

Improper Certificate Validation

Improper Certificate Validation represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.