CVE-2021-20328MongoDB 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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | mongo-java-driver | Fix pending | UBUNTU-CVE-2021-20328 | |
| Ubuntu 26.04 | mongo-java-driver | Under investigation | UBUNTU-CVE-2021-20328 | |
| Ubuntu 25.10 | mongo-java-driver | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-20328 | |
| Ubuntu 24.04 | mongo-java-driver | Under investigation | UBUNTU-CVE-2021-20328 | |
| Ubuntu 22.04 | mongo-java-driver | Under investigation | UBUNTU-CVE-2021-20328 | |
| Ubuntu 20.04 | mongo-java-driver | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-20328 | |
| Ubuntu 18.04 | mongo-java-driver | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-20328 | |
| Ubuntu 16.04 | mongo-java-driver | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-20328 | |
| Maven library | org.mongodb:mongo-java-driver | Fixed | 3.12.8 | GHSA-rghw-6px2-fgwc |
| Maven library | org.mongodb:mongodb-driver | Fixed | 3.12.8 | GHSA-rghw-6px2-fgwc |
| Maven library | org.mongodb:mongodb-driver-legacy | Fixed | 4.2.1 | GHSA-rghw-6px2-fgwc |
| Maven library | org.mongodb:mongodb-driver-sync | Fixed | 3.11.3 | GHSA-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.
- MongoDB Inc. mongo-java-driver: affected: 3.11 to 3.11.2, 3.12 to 3.12.7
- MongoDB Inc. mongodb-driver: affected: 3.11 to 3.11.2, 3.12 to 3.12.7
- MongoDB Inc. mongodb-driver-sync: affected: 4.2.0, 3.11 to 3.11.2, 3.12 to 3.12.7, 4.0 to 4.0.5, 4.1 to 4.1.1
- MongoDB Inc. mongodb-driver-legacy: affected: 4.2.0, 3.11 to 3.11.2, 3.12 to 3.12.7, 4.0 to 4.0.5, 4.1 to 4.1.1
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.