Bug 1831068 (CVE-2020-5236)

Summary: CVE-2020-5236 waitress: header with invalid characters can lead to DoS
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bdettelb, bmontgom, eparis, hvyas, infra-sig, jburrell, jjoyce, jschluet, lhh, lorenzo.gil.sanchez, lpeer, mburns, nstielau, rbean, sclewis, slinaber, sponnaga, tomckay
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: waitress 1.4.3 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the regex used to process HTTP Headers in python-waitress and is vulnerable to catastrophic backtracking. This flaw allows an attacker with the ability to send HTTP requests to a vulnerable server to cause a denial of service attack.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1832676, 1832677    
Bug Blocks: 1831070    

Description Guilherme de Almeida Suckevicz 2020-05-04 14:55:16 UTC
Waitress version 1.4.2 allows a DOS attack When waitress receives a header that contains invalid characters. When a header like "Bad-header: xxxxxxxxxxxxxxx\x10" is received, it will cause the regular expression engine to catastrophically backtrack causing the process to use 100% CPU time and blocking any other interactions. This allows an attacker to send a single request with an invalid header and take the service offline. This issue was introduced in version 1.4.2 when the regular expression was updated to attempt to match the behaviour required by errata associated with RFC7230. The regular expression that is used to validate incoming headers has been updated in version 1.4.3, it is recommended that people upgrade to the new version of Waitress as soon as possible.

Reference:
https://github.com/Pylons/waitress/security/advisories/GHSA-73m2-3pwg-5fgc

Upstream commit:
https://github.com/Pylons/waitress/commit/6e46f9e3f014d64dd7d1e258eaf626e39870ee1f

Comment 5 Summer Long 2020-05-07 04:35:25 UTC
External References:

https://docs.pylonsproject.org/projects/waitress/en/latest/#id1

Comment 6 Hardik Vyas 2020-05-11 07:50:53 UTC
Statement:

* OpenShift Container Platform 4 uses an earlier version of python-waitress which is not affected by this vulnerability.
* Red Hat Quay uses an earlier version of python-waitress which is not affected by this vulnerability.
* Red Hat OpenStack Platform 15 and 16 ship but do not use the flawed version of python-waitress. The impact for these products is therefore rated as having a security impact of Low. (Earlier versions of RHOSP do not ship the flawed code.)
* This issue did not affect Red Hat Ceph Storage 3 and 4 as the vulnerable code is not present in the shipped version of python-waitress.