Live threats

All CVEs / Mongodb

CVE-2021-20328Mongodb Java Driver

Medium 6.8 No auth needed

Priority
56
CVSS 3.1
6.8
EPSS
0.4%
probability of exploitation in 30 days · percentile 40
Auth required
No
Published
Feb 25, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-295
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Java Driver.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Maven org.mongodb:mongo-java-driver ≥ 3.11.0 < 3.11.3 3.11.3 —
Maven org.mongodb:mongo-java-driver ≥ 3.12.0 < 3.12.8 3.12.8 —
Maven org.mongodb:mongodb-driver ≥ 3.11.0 < 3.11.3 3.11.3 —
Maven org.mongodb:mongodb-driver ≥ 3.12.0 < 3.12.8 3.12.8 —
Maven org.mongodb:mongodb-driver-legacy ≥ 4.0.0 < 4.0.6 4.0.6 —
Maven org.mongodb:mongodb-driver-legacy ≥ 4.1.0 < 4.1.2 4.1.2 —
Maven org.mongodb:mongodb-driver-legacy ≥ 3.11.0 < 3.11.3 3.11.3 —
Maven org.mongodb:mongodb-driver-legacy ≥ 3.12.0 < 3.12.8 3.12.8 —
Maven org.mongodb:mongodb-driver-legacy ≥ 4.2.0 < 4.2.1 4.2.1 —
Maven org.mongodb:mongodb-driver-sync ≥ 4.0.0 < 4.0.6 4.0.6 —
Maven org.mongodb:mongodb-driver-sync ≥ 4.1.0 < 4.1.2 4.1.2 —
Maven org.mongodb:mongodb-driver-sync ≥ 4.2.0 < 4.2.1 4.2.1 —
Maven org.mongodb:mongodb-driver-sync ≥ 3.12.0 < 3.12.8 3.12.8 —
Maven org.mongodb:mongodb-driver-sync ≥ 3.11.0 < 3.11.3 3.11.3 —

Per OSV / GitHub Advisories (GHSA-rghw-6px2-fgwc). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
mongodbjava_driver≥ 3.11.0 < 3.11.3
mongodbjava_driver≥ 3.12.0 < 3.12.8
mongodbjava_driver≥ 4.0.0 < 4.0.6
mongodbjava_driver≥ 4.1.0 < 4.1.2
mongodbjava_driver≥ 4.2.0 < 4.2.1
quarkusquarkus< 1.13.3
quarkusquarkus1.13.3

Official sources

References

Links published by the sources. Open them with care.