Hide Forgot
Multiple python versions allow an HTTP server to conduct Regular Expression Denial of Service (ReDoS) attacks against a client because of urllib.request.AbstractBasicAuthHandler catastrophic backtracking. Upstream Issue: https://bugs.python.org/issue39503
Created python2 tracking bugs for this issue: Affects: fedora-all [bug 1809067] Created python3 tracking bugs for this issue: Affects: fedora-all [bug 1809073] Created python34 tracking bugs for this issue: Affects: epel-all [bug 1809068] Affects: fedora-all [bug 1809072] Created python35 tracking bugs for this issue: Affects: fedora-all [bug 1809069] Created python36 tracking bugs for this issue: Affects: epel-7 [bug 1809066] Affects: fedora-all [bug 1809071] Created python38 tracking bugs for this issue: Affects: fedora-all [bug 1809074]
Upstream proposed PR: https://github.com/python/cpython/pull/18284
The attack scenario is an attacker, in control of a server, who tries to conduct a Denial of Service attack against a victim client that uses a vulnerable python version. Due to expensive regular expression in AbstractBasicAuthHandler, when the client receives specially crafted responses from a server it may use all the CPU to match the regular expression. This flaw affects python applications that use AbstractBasicAuthHandler, either directly or indirectly (e.g. including HTTPBasicAuthHandler and ProxyBasicAuthHandler).
Lowering the Impact of the flaw to Moderate because the attacker needs to perform the attack from a server to a vulnerable client. Thus a client, to be affected, should first connect to either an untrusted server or to a trusted server that was compromised.
Another upstream issue (probably a duplicate): https://bugs.python.org/issue38826
Class AbstractBasicAuthHandler uses a particular regular expression with overlapping characters and nested quantifiers which results in a lot of backtracking on some particular subjects. Backtracking requires the regular expression engine to enumerate all possible solutions, which makes the operation very expensive as it has an exponential cost. For this reason, when a malicious server sends a specially crafted 401 response, the client will take a very long time to parse the request, causing a Denial of Service in some applications.
Statement: Applications that use AbstractBasicAuthHandler, HTTPBasicAuthHandler and ProxyBasicAuthHandler may be affected by this flaw. Other classes may use the vulnerable method http_error_auth_reqed in AbstractBasicAuthHandler as well. Versions of python36:3.6/python36 as shipped with Red Hat Enterprise Linux 8 are marked as notaffected as they just provide "symlinks" to the main python3 component, which provides the actual interpreter of the Python programming language.
Upstream fix: https://github.com/python/cpython/commit/0b297d4ff1c0e4480ad33acae793fbaf4bf015b4
FEDORA-2020-6a88dad4a0 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-8bdd3fd7a4 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2020-ea5bdbcc90 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report.
This issue has been addressed in the following products: Red Hat Enterprise Linux 7 Via RHSA-2020:3888 https://access.redhat.com/errata/RHSA-2020:3888
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2020-8492
This issue has been addressed in the following products: Red Hat Software Collections for Red Hat Enterprise Linux 6 Red Hat Software Collections for Red Hat Enterprise Linux 7 Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS Red Hat Software Collections for Red Hat Enterprise Linux 7.7 EUS Via RHSA-2020:4285 https://access.redhat.com/errata/RHSA-2020:4285
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2020:4433 https://access.redhat.com/errata/RHSA-2020:4433
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2020:4641 https://access.redhat.com/errata/RHSA-2020:4641