CVE-2021-20328 json
MongoDB Java driver client-side field level encryption not verifying KMS host name
published 2021-02-25 5 y ago modified 2026-06-17 4 mo ago also GHSA-rghw-6px2-fgwc , EUVD-2022-5169
- cvss
- 6.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 38%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- maven org.mongodb:mongodb-driver 3.11.3, 3.12.8
- maven org.mongodb:mongodb-driver-sync 3.11.3, 3.12.8, 4.0.6, 4.1.2, 4.2.1
- maven org.mongodb:mongo-java-driver 3.11.3, 3.12.8
- maven org.mongodb:mongodb-driver-legacy 3.11.3, 3.12.8, 4.0.6, 4.1.2, 4.2.1
- mongodb java_driver 3.11.3, 3.12.8, 4.0.6, 4.1.2, 4.2.1
- quarkus quarkus 1.13.3
- jira.mongodb.org/browse/JAVA-4017 advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
cisa ICSA-26-218-01 updated cvss 6.8
ABB Ability Zenon
-
ABB Ability Zenon /all IIoT services with MongoDB 4.2affected: mitigation
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
red hat product security vex CVE-2021-20328 updated cvss 6.4
mongo-java-driver: client-side field level encryption not verifying KMS host name
-
Red Hat A-MQ Clients 2 mongodb-driver mongodb-driveraffected: no fix planned “Will not fix”
-
Red Hat build of Debezium 1 mongodb-driver mongodb-driver Red Hat Integration Camel Quarkus 1 mongodb-driver mongodb-driveraffected: no fix available
-
Red Hat Integrationfixed: vendor fix RHSA-2021:4918
-
Red Hat Integration Camel Quarkus 2fixed: vendor fix RHSA-2021:4767
-
Red Hat Integration Debezium 1.4.2fixed: vendor fix RHSA-2021:0871
-
Red Hat Fuse 7 mongo-java-driver mongo-java-driver Red Hat JBoss Data Virtualization 6 mongo-java-driver mongo-java-driver Red Hat JBoss Enterprise Application Platform 7 mongo-java-driver mongo-java-driver Red Hat JBoss Fuse 6 mongo-java-driver mongo-java-driver Red Hat OpenShift Container Platform 4 openshift4/ose-metering-presto Red Hat Software Collections rh-mongodb36-mongo-java-driver, rh-mongodb36-mongo-java-driver-bson, rh-mongodb36-mongo-java-driver-driver, rh-mongodb36-mongo-java-driver-javadoc, rh-mongodb36-mongo-java-driver-driver-core, rh-mongodb36-mongo-java-driver-driver-asyncnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.44% chance of exploitation in the next 30 days, higher than 38% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.4 | CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N |
| NVD | 3.1 | 6.8 | CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| NVD | 2.0 | 4.3 | AV:A/AC:M/Au:N/C:P/I:P/A:N |
| GitHub | 3.1 | 6.8 | CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| maven | org.mongodb:mongodb-driver | >=3.11.0, <3.11.3 >=3.12.0, <3.12.8 |
3.11.3 3.12.8 |
| 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 |
| maven | org.mongodb:mongo-java-driver | >=3.11.0, <3.11.3 >=3.12.0, <3.12.8 |
3.11.3 3.12.8 |
| 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 |
Affected products
- MongoDB Inc. mongo-java-driver
- MongoDB Inc. mongodb-driver
- MongoDB Inc. mongodb-driver-sync
- MongoDB Inc. mongodb-driver-legacy
- mongodb java_driver
Classification
- Weakness
-
- CWE-295 Improper Certificate Validation
References
-
jira.mongodb.org
/browse/JAVA-4017
web, issue-tracking, patch, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-20328
advisory
Sources
- CVE List CVE-2021-20328
- GitHub Advisory GHSA-rghw-6px2-fgwc
- NVD CVE-2021-20328
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.