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

- Priority: **Routine**
- Reason: Not severe (CVSS 6.4, adjacent network); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-02-25 · Modified: 2024-09-16
- Aliases: UBUNTU-CVE-2021-20328, GHSA-rghw-6px2-fgwc
- Record: https://cvemate.com/vulnerability/CVE-2021-20328 · JSON: https://cvemate.com/vulnerability/CVE-2021-20328/json

## Description

```text
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.
```

## Signals

- CVSS: 6.8 medium (v3.1, NVD) CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- EPSS: 0.441%, percentile 40.091%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- ubuntu mongo-java-driver (Ubuntu): All versions (No fix recorded)
- org.mongodb mongo-java-driver (Maven): ≥ 3.11.0, \< 3.11.3 \| ≥ 3.12.0, \< 3.12.8
- org.mongodb mongodb-driver (Maven): ≥ 3.11.0, \< 3.11.3 \| ≥ 3.12.0, \< 3.12.8
- org.mongodb mongodb-driver-legacy (Maven): ≥ 4.0.0, \< 4.0.6 \| ≥ 4.1.0, \< 4.1.2 \| ≥ 3.11.0, \< 3.11.3 \| ≥ 3.12.0, \< 3.12.8 \| ≥ 4.2.0, \< 4.2.1
- org.mongodb mongodb-driver-sync (Maven): ≥ 4.0.0, \< 4.0.6 \| ≥ 4.1.0, \< 4.1.2 \| ≥ 4.2.0, \< 4.2.1 \| ≥ 3.12.0, \< 3.12.8 \| ≥ 3.11.0, \< 3.11.3
- mongodb inc. mongo-java-driver: ≥ 3.11, ≤ 3.11.2 \| ≥ 3.12, ≤ 3.12.7
- mongodb inc. mongodb-driver: ≥ 3.11, ≤ 3.11.2 \| ≥ 3.12, ≤ 3.12.7
- mongodb inc. 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
- mongodb inc. 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 java driver: ≥ 3.11.0, \< 3.11.3 \| ≥ 3.12.0, \< 3.12.8 \| ≥ 4.0.0, \< 4.0.6 \| ≥ 4.1.0, \< 4.1.2 \| ≥ 4.2.0, \< 4.2.1
- quarkus quarkus: \< 1.13.3 \| 1.13.3

## References

- <https://jira.mongodb.org/browse/JAVA-4017>
- <https://ubuntu.com/security/CVE-2021-20328>
- <https://www.cve.org/CVERecord?id=CVE-2021-20328>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20328>

---

Data as of 2026-12-05T04:44:50.249Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
