Skip to content

[3.7] bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284)#19297

Merged
vstinner merged 1 commit intopython:3.7from
miss-islington:backport-0b297d4-3.7
Apr 2, 2020
Merged

[3.7] bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284)#19297
vstinner merged 1 commit intopython:3.7from
miss-islington:backport-0b297d4-3.7

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Apr 2, 2020

The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking. Vulnerability reported by Ben Caller
and Matt Schwager.

AbstractBasicAuthHandler of urllib.request now parses all
WWW-Authenticate HTTP headers and accepts multiple challenges per
header: use the realm of the first Basic challenge.

Co-Authored-By: Serhiy Storchaka storchaka@gmail.com
(cherry picked from commit 0b297d4)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue39503

The AbstractBasicAuthHandler class of the urllib.request module uses
an inefficient regular expression which can be exploited by an
attacker to cause a denial of service. Fix the regex to prevent the
catastrophic backtracking. Vulnerability reported by Ben Caller
and Matt Schwager.

AbstractBasicAuthHandler of urllib.request now parses all
WWW-Authenticate HTTP headers and accepts multiple challenges per
header: use the realm of the first Basic challenge.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 0b297d4)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington
Copy link
Contributor Author

@vstinner: Status check is done, and it's a failure ❌ .

@miss-islington
Copy link
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@vstinner vstinner merged commit b57a736 into python:3.7 Apr 2, 2020
@miss-islington miss-islington deleted the backport-0b297d4-3.7 branch April 2, 2020 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants