Bug 1995162 (CVE-2021-3737) - CVE-2021-3737 python: urllib: HTTP client possible infinite loop on a 100 Continue response
Summary: CVE-2021-3737 python: urllib: HTTP client possible infinite loop on a 100 Con...
Keywords:
Status: NEW
Alias: CVE-2021-3737
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1997680 1997685 1997686 1997687 1997688 1997689 1997690 1997669 1997670 1997671 1997672 1997673 1997674 1997675 1997676 1997677 1997679 1997681 1997682 1997683 1997684 1997691
Blocks: 1995165
TreeView+ depends on / blocked
 
Reported: 2021-08-18 14:50 UTC by Pedro Sampaio
Modified: 2021-10-04 19:40 UTC (History)
27 users (show)

Fixed In Version: python 3.6.14, python 3.7.11, python 3.8.11, python 3.9.6
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in python. An improperly handled HTTP response in the HTTP client code of python may allow a remote attacker, who controls the HTTP server, to make the client script enter an infinite loop, consuming CPU time. The highest threat from this vulnerability is to system availability.
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Pedro Sampaio 2021-08-18 14:50:00 UTC
HTTP client can get stuck infinitely reading len(line) < 64k lines after receiving a '100 Continue' HTTP response. This could lead to the client being a bandwidth sink for anyone in control of a server.

References:

https://bugs.python.org/issue44022
https://github.com/python/cpython/pull/25916
https://github.com/python/cpython/pull/26503
https://build.opensuse.org/package/view_file/devel:languages:python:Factory/python/bpo44022-fix-http-client-infinite-line-reading-after-a-HTTP-100-Continue.patch?expand=1
https://bugzilla.redhat.com/show_bug.cgi?id=1991918

Comment 1 Riccardo Schirone 2021-08-25 15:44:39 UTC
Setting CVSS score to 6.5/CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H .

User Interaction (UI) set to Required (R) because the flaw is in the HTTP client code, thus the attack scenario that was considered is that of a user running a python script/tool to erroneously connect to a malicious HTTP server. Libraries or tools that do not require user interaction are assumed to connect to trusted servers which would need to be compromised by an attacker first in order to trigger this vulnerability. In this last case, you'd have UI=N, but AC=H giving a CVSSv3.1 score of 5.9 that is lower than the current 6.5. For this reason we chose to evaluate the worst-case reasonable scenario.


Given the flaw is in the client side and it requires automatically connecting to a compromised but trusted server or manually connecting to a malicious server, the Impact of this flaw has been set to Low. It requires indeed unlikely circumstances to be able to be exploited and when it is it is enough to stop the client or restart it.

Comment 3 Riccardo Schirone 2021-08-25 15:59:28 UTC
Created mingw-python3 tracking bugs for this issue:

Affects: fedora-all [bug 1997670]


Created python2.7 tracking bugs for this issue:

Affects: fedora-all [bug 1997671]


Created python3.10 tracking bugs for this issue:

Affects: fedora-all [bug 1997672]


Created python3.5 tracking bugs for this issue:

Affects: fedora-all [bug 1997673]


Created python3.6 tracking bugs for this issue:

Affects: fedora-all [bug 1997674]


Created python3.7 tracking bugs for this issue:

Affects: fedora-all [bug 1997675]


Created python3.8 tracking bugs for this issue:

Affects: fedora-all [bug 1997676]


Created python3.9 tracking bugs for this issue:

Affects: fedora-all [bug 1997677]


Created python34 tracking bugs for this issue:

Affects: epel-all [bug 1997669]


Note You need to log in before you can comment on or make changes to this bug.