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

- Severity: Medium 6.4 (CVSS:3.1, scored by mongodb) `CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.44%, higher than 40% of CVEs (2026-12-01)
- Published: 2021-02-25T16:30:14.536Z
- Modified: 2026-06-17T03:33:40.913Z
- Also known as: GHSA-rghw-6px2-fgwc
- Weaknesses: CWE-295
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- 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.

(As written by CVE List.)

## Affected

- MongoDB Inc. mongo-java-driver: from 3.11 up to 3.11.2; from 3.12 up to 3.12.7
- MongoDB Inc. mongodb-driver: from 3.11 up to 3.11.2; from 3.12 up to 3.12.7
- MongoDB Inc. mongodb-driver-sync: 4.2.0; from 3.11 up to 3.11.2; from 3.12 up to 3.12.7; from 4.0 up to 4.0.5; from 4.1 up to 4.1.1
- MongoDB Inc. mongodb-driver-legacy: 4.2.0; from 3.11 up to 3.11.2; from 3.12 up to 3.12.7; from 4.0 up to 4.0.5; from 4.1 up to 4.1.1
- mongodb java_driver: from 3.11 up to 3.11.2; from 3.12 up to 3.12.7; 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
- org.mongodb:mongodb-driver (Maven): from 3.11.0 before 3.11.3; from 3.12.0 before 3.12.8
- org.mongodb:mongodb-driver-sync (Maven): from 4.0.0 before 4.0.6; from 4.1.0 before 4.1.2; from 4.2.0 before 4.2.1; from 3.12.0 before 3.12.8; from 3.11.0 before 3.11.3
- org.mongodb:mongo-java-driver (Maven): from 3.11.0 before 3.11.3; from 3.12.0 before 3.12.8
- org.mongodb:mongodb-driver-legacy (Maven): from 4.0.0 before 4.0.6; from 4.1.0 before 4.1.2; from 3.11.0 before 3.11.3; from 3.12.0 before 3.12.8; from 4.2.0 before 4.2.1
- quarkus quarkus: before 1.13.3; 1.13.3

## Every score

- mongodb: CVSS:3.1 6.4 Medium `CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:A/AC:M/Au:N/C:P/I:P/A:N`

## References

- <https://jira.mongodb.org/browse/JAVA-4017> (issue-tracking, patch, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-20328> (advisory)

## Sources

- CVE List: [CVE-2021-20328](https://www.cve.org/CVERecord?id=CVE-2021-20328), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-rghw-6px2-fgwc](https://github.com/advisories/GHSA-rghw-6px2-fgwc), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2021-20328](https://nvd.nist.gov/vuln/detail/CVE-2021-20328), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-20328 · Whole record: https://cve.day/CVE-2021-20328.json · Rebuilt by cve.day 2026-11-25T22:58:00.046Z
