CVE-2021-3733: Medium severity Python Python vulnerability
Python is vulnerable to a denial of service, caused by a regular expression denial of service (ReDoS) flaw in the AbstractBasicAuthHandler class in urllib. By persuading a victim to visit a specially-crafted web site, a remote attacker could exploit this vulnerability to cause a denial of service condition.
Other sources
The ReDoS-vulnerable regex has quadratic worst-case complexity and it allows cause a denial of service when identifying crafted invalid RFCs. This ReDoS issue is on the client side and needs remote attackers to control the HTTP server.
References:
https://bugs.python.org/issue43075 https://github.com/python/cpython/pull/24391
— Red Hat
There's a flaw in urllib's AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP client (such as web browser) connects to, could trigger a Regular Expression Denial of Service (ReDOS) during an authentication request with a specially crafted payload that is sent by the server to the client. The greatest threat that this flaw poses is to application availability.
— Ubuntu
There's a flaw in urllib's AbstractBasicAuthHandler class. An attacker who controls a malicious HTTP server that an HTTP client (such as web browser) connects to could trigger a Regular Expression Denial of Service (ReDOS) during an authentication request with a specially crafted payload that is sent by the server to the client. The greatest threat that this flaw poses is to application availability.
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/python3to a version that resolves this vulnerability.Fixed in 0:3.6.8-39.el8_4 - Upgrade
Upgrade
redhat/rh-python38-babelto a version that resolves this vulnerability.Fixed in 0:2.7.0-12.el7 - Upgrade
Upgrade
redhat/rh-python38-pythonto a version that resolves this vulnerability.Fixed in 0:3.8.11-2.el7 - Upgrade
Upgrade
redhat/rh-python38-python-cryptographyto a version that resolves this vulnerability.Fixed in 0:2.8-5.el7 - Upgrade
Upgrade
redhat/rh-python38-python-jinja2to a version that resolves this vulnerability.Fixed in 0:2.10.3-6.el7 - Upgrade
Upgrade
redhat/rh-python38-python-lxmlto a version that resolves this vulnerability.Fixed in 0:4.4.1-7.el7 - Upgrade
Upgrade
redhat/rh-python38-python-pipto a version that resolves this vulnerability.Fixed in 0:19.3.1-2.el7 - Upgrade
Upgrade
redhat/rh-python38-python-urllib3to a version that resolves this vulnerability.Fixed in 0:1.25.7-7.el7 - Upgrade
Upgrade
redhat/python27-pythonto a version that resolves this vulnerability.Fixed in 0:2.7.18-4.el7 - Upgrade
Upgrade
redhat/pythonto a version that resolves this vulnerability.Fixed in 3.6.14 - Upgrade
Upgrade
redhat/pythonto a version that resolves this vulnerability.Fixed in 3.7.11 - Upgrade
Upgrade
redhat/pythonto a version that resolves this vulnerability.Fixed in 3.8.10 - Upgrade
Upgrade
redhat/pythonto a version that resolves this vulnerability.Fixed in 3.9.5 - Upgrade
Upgrade
debian/pypy3to a version that resolves this vulnerability.Fixed in 7.3.11+dfsg-2+deb12u3Fixed in 7.3.19+dfsg-2Fixed in 8.0.1+dfsg-1 - Upgrade
Upgrade
azurelinux/python2to a version that resolves this vulnerability.Fixed in 2.7.18-10
Event History
Parent advisories
This vulnerability appears in the following advisories.
Peer vulnerabilities
Found alongside the following vulnerabilities.
Frequently Asked Questions
What is CVE-2021-3733?
CVE-2021-3733 is a vulnerability in urllib's AbstractBasicAuthHandler class that allows an attacker to trigger a Regular Expression Denial of Service (ReDOS) during an authentication request.
What can an attacker do with CVE-2021-3733?
An attacker who controls a malicious HTTP server can exploit CVE-2021-3733 to launch a ReDOS attack on an HTTP client (e.g., web browser).
How severe is CVE-2021-3733?
CVE-2021-3733 has a severity rating of 6.5, which is considered medium.
Which software versions are affected by CVE-2021-3733?
CVE-2021-3733 affects Python versions 3.6.14, 3.7.11, 3.8.10, and 3.9.5, as well as other related packages.
How can I mitigate CVE-2021-3733?
To mitigate CVE-2021-3733, it is recommended to update to the fixed versions of Python and related packages provided by Red Hat.