Improper validation of certificate with host mismatch in urllib3 - CVE-2021-28363

 

Improper validation of certificate with host mismatch in urllib3 - CVE-2021-28363

Published: March 22, 2021


Vulnerability identifier: #VU51604
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2021-28363
CWE-ID: CWE-297
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: shazow (Andrey Petrov)
Affected software:
urllib3

Detailed vulnerability description

The vulnerability allows a remote attacker to perform MitM attack.

The vulnerability exists due to urllib3 library for Python omits SSL certificate validation in some cases involving HTTPS to HTTPS proxies. The initial connection to the HTTPS proxy (if an SSLContext isn't given via proxy_config) doesn't verify the hostname of the certificate. This means certificates for different servers that still validate properly with the default urllib3 SSLContext will be silently accepted. A remote attacker can supply a valid SSL certificate for a different hostname and perform Man-in-the-Middle (MitM) attack.


How to mitigate CVE-2021-28363

Install updates from vendor's website.

Sources