CVEfocus › CVE database › CVE-2021-20328

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

CVSS 6.4 MediumEPSS 0.4% (higher than 30% of CVEs)Published 2021-02-25Updated 2024-09-16Assigner: mongodb

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.

CWE-295

What to do

Fixed builds are available from Maven: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
1Fix pending
3Under investigation
4Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10mongo-java-driverFix pendingUBUNTU-CVE-2021-20328
Ubuntu 26.04mongo-java-driverUnder investigationUBUNTU-CVE-2021-20328
Ubuntu 25.10mongo-java-driverWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-20328
Ubuntu 24.04mongo-java-driverUnder investigationUBUNTU-CVE-2021-20328
Ubuntu 22.04mongo-java-driverUnder investigationUBUNTU-CVE-2021-20328
Ubuntu 20.04mongo-java-driverWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-20328
Ubuntu 18.04mongo-java-driverWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-20328
Ubuntu 16.04mongo-java-driverWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2021-20328
Maven libraryorg.mongodb:mongo-java-driverFixed3.12.8GHSA-rghw-6px2-fgwc
Maven libraryorg.mongodb:mongodb-driverFixed3.12.8GHSA-rghw-6px2-fgwc
Maven libraryorg.mongodb:mongodb-driver-legacyFixed4.2.1GHSA-rghw-6px2-fgwc
Maven libraryorg.mongodb:mongodb-driver-syncFixed3.11.3GHSA-rghw-6px2-fgwc

What the vendor says

As published in the CVE record by mongodb, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.