CVE-2021-20328 | MongoDB 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.

Published: 2021-02-25 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-20328 is rated Low Risk (37.9/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.43%). Mandatory action: Monitor for updates and reassess as exploit intelligence or EPSS changes.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-20328

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.13% 0.43% +0.30%
2 2025-11-21 0.04% 0.13% +0.09%
3 2025-11-18 0.04%

Full EPSS history (13 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-20328

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.4 3.1 MEDIUM
CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:A)
Attacker has to be nearby on the network—same office, same link, that vibe—not the whole wide internet.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.2 5.2 [email protected]
6.8 3.1 MEDIUM
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N Click to expand
Attack vector (AV:A)
Attacker has to be nearby on the network—same office, same link, that vibe—not the whole wide internet.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:N)
Service keeps running; no real outage angle.
1.6 5.2 [email protected]
4.3 2.0 MEDIUM
AV:A/AC:M/Au:N/C:P/I:P/A:N Click to expand
Access vector (AV:A)
Requires access to an adjacent network segment.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:N)
No availability impact.
5.5 4.9 [email protected]

Weakness enumeration for CVE-2021-20328

GitHub Security Advisory for CVE-2021-20328

GHSA-rghw-6px2-fgwc · Severity: medium · Ecosystem: maven — Improper Certificate Validation in MongoDB

OS Trackers for CVE-2021-20328

vendor priority summary link
debian unimportant CVE-2021-20328 unimportant priority: Debian including 1 source packages (mongo-java-driver), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2021-20328
redhat medium https://access.redhat.com/security/cve/CVE-2021-20328
ubuntu low CVE-2021-20328 low priority: Ubuntu including 1 source packages (mongo-java-driver), 16 status rows across 16 suites (bionic, focal, groovy, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): ignored 8, needs-triage 7, DNE 1. https://ubuntu.com/security/CVE-2021-20328

Affected software / configurations for CVE-2021-20328

Vendor Product Version Raw CPE
mongodb java_driver >= 3.11.0, < 3.11.3 cpe:2.3:a:mongodb:java_driver:*:*:*:*:*:mongodb:*:*
mongodb java_driver >= 3.12.0, < 3.12.8 cpe:2.3:a:mongodb:java_driver:*:*:*:*:*:mongodb:*:*
mongodb java_driver >= 4.0.0, < 4.0.6 cpe:2.3:a:mongodb:java_driver:*:*:*:*:*:mongodb:*:*
mongodb java_driver >= 4.1.0, < 4.1.2 cpe:2.3:a:mongodb:java_driver:*:*:*:*:*:mongodb:*:*
mongodb java_driver >= 4.2.0, < 4.2.1 cpe:2.3:a:mongodb:java_driver:*:*:*:*:*:mongodb:*:*
quarkus quarkus < 1.13.3 cpe:2.3:a:quarkus:quarkus:*:*:*:*:*:*:*:*
quarkus quarkus 1.13.3 cpe:2.3:a:quarkus:quarkus:1.13.3:*:*:*:*:*:*:*

References for CVE-2021-20328

URL Tags
https://jira.mongodb.org/browse/JAVA-4017 Issue Tracking Patch Vendor Advisory
cvelogic Threat Intelligence