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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Java / Kotlin (Maven) | org.mongodb:mongodb-driver | >= 3.11.0, < 3.11.3, >= 3.12.0, < 3.12.8 | 3.11.3, 3.12.8 |
| Java / Kotlin (Maven) | org.mongodb:mongodb-driver-legacy | >= 4.0.0, < 4.0.6, >= 4.1.0, < 4.1.2, >= 3.11.0, < 3.11.3, >= 3.12.0, < 3.12.8, >= 4.2.0, < 4.2.1 | 4.0.6, 4.1.2, 3.11.3, 3.12.8, 4.2.1 |
| Java / Kotlin (Maven) | org.mongodb:mongodb-driver-sync | >= 4.0.0, < 4.0.6, >= 4.1.0, < 4.1.2, >= 4.2.0, < 4.2.1, >= 3.12.0, < 3.12.8, >= 3.11.0, < 3.11.3 | 4.0.6, 4.1.2, 4.2.1, 3.12.8, 3.11.3 |
| Java / Kotlin (Maven) | org.mongodb:mongo-java-driver | >= 3.11.0, < 3.11.3, >= 3.12.0, < 3.12.8 | 3.11.3, 3.12.8 |
References
- CVSS vector
CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N- Weakness (CWE)
CWE-295- Platform
- Java / Kotlin (Maven)
- Package
org.mongodb:mongodb-driver, org.mongodb:mongodb-driver-legacy, org.mongodb:mongodb-driver-sync- Disclosed
- 24.05.2022
- Updated
- 11.10.2026 11:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-rghw-6px2-fgwc - CC BY 4.0
Vulnerability history: org.mongodb:mongo-java-driver
All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.
This is the only known vulnerability of this package.
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.