Every CVE Search/ Get API key

CVE-2021-20328

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

6.4 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Adjacent network
Complexity
High
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
None

Exploit likelihood

0.44%Unchanged since Apr 14, 2021
90%50%10%1%

What each source reports

CVE List Score used 6.4

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.

Record
CVE-2021-20328
CVSS 3.1
6.4 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Weakness
CWE-295
Updated
2026-11-02
EUVDEUVD-2022-5169 6.4

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.

Record
EUVD-2022-5169
CVSS 3.1
6.4 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-rghw-6px2-fgwc 6.8

Improper Certificate Validation in MongoDB

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.

Record
GHSA-rghw-6px2-fgwc
CVSS 3.1
6.8 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Weakness
CWE-295
Updated
2026-11-02
NVD 6.4

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.

Record
CVE-2021-20328
CVSS 3.1
6.4 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
CVSS 3.1
6.8 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS 2.0
4.3 MediumAV:A/AC:M/Au:N/C:P/I:P/A:N
Weakness
CWE-295
Updated
2026-11-02
OSV 6.8

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.

Record
CVE-2021-20328
CVSS 3.1
6.8 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Updated
2026-11-02
OSVGHSA-rghw-6px2-fgwc 6.8

Improper Certificate Validation in MongoDB

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.

Record
GHSA-rghw-6px2-fgwc
CVSS 3.1
6.8 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Weakness
CWE-295
Updated
2026-11-02
OSVUBUNTU-CVE-2021-20328 6.4

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.

Record
UBUNTU-CVE-2021-20328
CVSS 3.1
6.4 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N
CVSS 3.1
6.8 MediumCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
org.mongodb:mongodb-driver
Maven
3.11.0 to 3.11.2
3.11.3
org.mongodb:mongodb-driver
Maven
3.12.0 to 3.12.7
3.12.8
org.mongodb:mongodb-driver-sync
Maven
4.0.0 to 4.0.5
4.0.6
org.mongodb:mongodb-driver-sync
Maven
4.1.0 to 4.1.1
4.1.2
org.mongodb:mongodb-driver-sync
Maven
4.2.0 to 4.2.0
4.2.1
org.mongodb:mongo-java-driver
Maven
3.11.0 to 3.11.2
3.11.3
org.mongodb:mongo-java-driver
Maven
3.12.0 to 3.12.7
3.12.8
org.mongodb:mongodb-driver-legacy
Maven
4.0.0 to 4.0.5
4.0.6
org.mongodb:mongodb-driver-legacy
Maven
4.1.0 to 4.1.1
4.1.2
org.mongodb:mongodb-driver-legacy
Maven
3.11.0 to 3.11.2
3.11.3
Show 26 moreShow less
Affected packages
PackageAffectedFixed
org.mongodb:mongodb-driver-legacy
Maven
3.12.0 to 3.12.7
3.12.8
org.mongodb:mongodb-driver-sync
Maven
3.12.0 to 3.12.7
3.12.8
org.mongodb:mongodb-driver-sync
Maven
3.11.0 to 3.11.2
3.11.3
org.mongodb:mongodb-driver-legacy
Maven
4.2.0 to 4.2.0
4.2.1
org.mongodb:mongodb-driver
Maven
3.11.0 up to 3.11.3, plus listed versions
3.11.13.11.2
3.11.3
org.mongodb:mongodb-driver
Maven
3.12.0 up to 3.12.8, plus listed versions
3.12.13.12.23.12.33.12.43.12.53.12.63.12.7
3.12.8
org.mongodb:mongodb-driver-sync
Maven
4.0.0 up to 4.0.6, plus listed versions
4.0.14.0.24.0.34.0.44.0.5
4.0.6
org.mongodb:mongodb-driver-sync
Maven
4.1.0 up to 4.1.2, plus listed versions
4.1.1
4.1.2
org.mongodb:mongodb-driver-sync
Maven
4.2.0 up to 4.2.1
4.2.1
org.mongodb:mongo-java-driver
Maven
3.11.0 up to 3.11.3, plus listed versions
3.11.13.11.2
3.11.3
org.mongodb:mongo-java-driver
Maven
3.12.0 up to 3.12.8, plus listed versions
3.12.13.12.23.12.33.12.43.12.53.12.63.12.7
3.12.8
org.mongodb:mongodb-driver-legacy
Maven
4.0.0 up to 4.0.6, plus listed versions
4.0.14.0.24.0.34.0.44.0.5
4.0.6
org.mongodb:mongodb-driver-legacy
Maven
4.1.0 up to 4.1.2, plus listed versions
4.1.1
4.1.2
org.mongodb:mongodb-driver-legacy
Maven
3.11.0 up to 3.11.3, plus listed versions
3.11.13.11.2
3.11.3
org.mongodb:mongodb-driver-legacy
Maven
3.12.0 up to 3.12.8, plus listed versions
3.12.13.12.23.12.33.12.43.12.53.12.63.12.7
3.12.8
org.mongodb:mongodb-driver-sync
Maven
3.12.0 up to 3.12.8, plus listed versions
3.12.13.12.23.12.33.12.43.12.53.12.63.12.7
3.12.8
org.mongodb:mongodb-driver-sync
Maven
3.11.0 up to 3.11.3, plus listed versions
3.11.13.11.2
3.11.3
org.mongodb:mongodb-driver-legacy
Maven
4.2.0 up to 4.2.1
4.2.1
mongo-java-driver
Ubuntu:16.04:LTS
All versions, plus listed versions
2.12.4-1
None known
mongo-java-driver
Ubuntu:18.04:LTS
All versions, plus listed versions
3.3.0-13.6.2-13.6.3-2~18.04
None known
mongo-java-driver
Ubuntu:20.04:LTS
All versions, plus listed versions
3.6.3-2
None known
mongo-java-driver
Ubuntu:22.04:LTS
All versions, plus listed versions
3.6.3-2
None known
mongo-java-driver
Ubuntu:24.04:LTS
All versions, plus listed versions
3.6.3-2
None known
mongo-java-driver
Ubuntu:25.10
All versions, plus listed versions
3.6.3-2
None known
mongo-java-driver
Ubuntu:26.10
All versions, plus listed versions
3.6.3-2.1
None known
mongo-java-driver
Ubuntu:26.04:LTS
All versions, plus listed versions
3.6.3-23.6.3-2build13.6.3-2.1
None known

History

History
RecordedChangedSources
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-20328 is a medium vulnerability (CVSS 6.4) in Mongodb Java Driver, published February 25, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.44%, the 37th percentile. Fixed in org.mongodb:mongodb-driver 3.11.3.

References

MoveEnter Open