◐ Shell
reader mode source ↗
Skip to content

[3.6] bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler#19299

Closed
tapakund wants to merge 1 commit into
python:3.6from
tapakund:3.6
Closed

[3.6] bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler#19299
tapakund wants to merge 1 commit into
python:3.6from
tapakund:3.6

Conversation

@tapakund

@tapakund tapakund commented Apr 2, 2020

Copy link
Copy Markdown

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

Signed-off-by: Tapas Kundu tkundu@vmware.com

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>

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

Signed-off-by: Tapas Kundu <tkundu@vmware.com>
@tapakund

tapakund commented Apr 2, 2020

Copy link
Copy Markdown
Author

@vstinner pls review.

@vstinner

vstinner commented Apr 2, 2020

Copy link
Copy Markdown
Member

Sorry but I prefer to backport security fixes myself. I created PR #19304.

@vstinner vstinner closed this Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants