What’s Vulnerable › Vulnerabilities
CVE-2021-20328: MongoDB Java driver client-side field level encryption not verifying KMS host name
- Severity: medium (CVSS 6.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2021-02-25 · updated 2026-06-17
- Weakness: CWE-295
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
- MongoDB Java Driver: from 3.11.0 before 3.11.3; from 3.12.0 before 3.12.8; from 4.0.0 before 4.0.6; from 4.1.0 before 4.1.2; from 4.2.0 before 4.2.1 — fixed in 3.11.3, 3.12.8, 4.0.6, 4.1.2, 4.2.1
- quarkusio quarkus: before 1.13.3; 1.13.3 — fixed in 1.13.3
How to fix
Upgrade to a fixed version: MongoDB Java Driver 3.11.3, 3.12.8, 4.0.6, 4.1.2; quarkusio quarkus 1.13.3. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2021-20328 or the next vulnerability affects your stack