CVE-2020-7924: MongoDB Tools Improper Certificate Validation vulnerability
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.41835%
CWE
Published
5/24/2022
Updated
7/3/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/mongodb/mongo-tools | go | >= 100.0.0, < 100.2.0 | 100.2.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the conditional check in configureClient() that combines SSLAllowInvalidCert/SSLAllowInvalidHost with TLSInsecure. The commit diff shows this function was modified to add TLSInsecure to the condition, but more critically, the original logic (opts.SSLAllowInvalidCert || opts.SSLAllowInvalidHost) caused InsecureSkipVerify to disable all validation when either deprecated flag was used. This matches the CWE-295 description of improper certificate validation, as using --sslAllowInvalidHostnames (intended for hostname checks only) inadvertently disabled full certificate validation through this function's logic.