CVE-2021-20328Mongodb Java Driver
Medium 6.8 No auth needed
Follow: this CVE · Mongodb · Mongodb Java Driver We alert you by email or Slack (account required).
- 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.
What to do
- Apply the vendor's security update for Java Driver.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| mongodb | java_driver | ≥ 3.11.0 < 3.11.3 |
| mongodb | java_driver | ≥ 3.12.0 < 3.12.8 |
| mongodb | java_driver | ≥ 4.0.0 < 4.0.6 |
| mongodb | java_driver | ≥ 4.1.0 < 4.1.2 |
| mongodb | java_driver | ≥ 4.2.0 < 4.2.1 |
| quarkus | quarkus | < 1.13.3 |
| quarkus | quarkus | 1.13.3 |
Official sources
References
Links published by the sources. Open them with care.
- jira.mongodb.org Issue Tracking Patch Vendor Advisory