Skip to content
OpenAdvisories
Medium · 6.4 CVE-2021-20328 EUVD-2022-5169GHSA-rghw-6px2-fgwc

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

Published Feb 25, 2021 · Updated Sep 16, 2024 · Assigned by mongodb

Description

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.

Affected products

VendorProductAffectedFixed
MongoDB mongo-java-driver 3.11 – ≤ 3.11.2, 3.12 – ≤ 3.12.7 —
MongoDB mongodb-driver 3.11 – ≤ 3.11.2, 3.12 – ≤ 3.12.7 —
MongoDB mongodb-driver-sync 4.2.0, 3.11 – ≤ 3.11.2, 3.12 – ≤ 3.12.7, 4.0 – ≤ 4.0.5, 4.1 – ≤ 4.1.1 —
MongoDB mongodb-driver-legacy 4.2.0, 3.11 – ≤ 3.11.2, 3.12 – ≤ 3.12.7, 4.0 – ≤ 4.0.5, 4.1 – ≤ 4.1.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 26.10 mongo-java-driver No fix yet —
Ubuntu 26.04 LTS mongo-java-driver No fix yet —
Ubuntu 25.10 mongo-java-driver No fix yet —
Ubuntu 24.04 LTS mongo-java-driver No fix yet —
Ubuntu 22.04 LTS mongo-java-driver No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS mongo-java-driver No fix yet —
Ubuntu 18.04 LTS mongo-java-driver No fix yet —
Ubuntu 16.04 LTS mongo-java-driver No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.mongodb:mongo-java-driver >= 3.11.0, < 3.11.3 3.11.3 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongo-java-driver >= 3.12.0, < 3.12.8 3.12.8 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver >= 3.11.0, < 3.11.3 3.11.3 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver >= 3.12.0, < 3.12.8 3.12.8 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-legacy >= 4.0.0, < 4.0.6 4.0.6 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-legacy >= 4.1.0, < 4.1.2 4.1.2 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-legacy >= 3.11.0, < 3.11.3 3.11.3 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-legacy >= 3.12.0, < 3.12.8 3.12.8 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-legacy >= 4.2.0, < 4.2.1 4.2.1 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-sync >= 4.0.0, < 4.0.6 4.0.6 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-sync >= 4.1.0, < 4.1.2 4.1.2 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-sync >= 4.2.0, < 4.2.1 4.2.1 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-sync >= 3.12.0, < 3.12.8 3.12.8 GHSA-rghw-6px2-fgwc
Maven org.mongodb:mongodb-driver-sync >= 3.11.0, < 3.11.3 3.11.3 GHSA-rghw-6px2-fgwc

Advisories 2

References