Bug 1791415 (CVE-2019-16786) - CVE-2019-16786 waitress: HTTP request smuggling through invalid Transfer-Encoding
Summary: CVE-2019-16786 waitress: HTTP request smuggling through invalid Transfer-Enco...
Keywords:
Status: NEW
Alias: CVE-2019-16786
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1791416 1791417 1791418 1791488 1791489 1793268 1793269 1791490
Blocks: 1791419
TreeView+ depends on / blocked
 
Reported: 2020-01-15 19:33 UTC by Guilherme de Almeida Suckevicz
Modified: 2020-01-21 03:37 UTC (History)
17 users (show)

Fixed In Version: waitress 1.4.0
Doc Type: If docs needed, set a value
Doc Text:
An HTTP-interpretation flaw was found in waitress which did not properly validate incoming HTTP headers. When parsing the Transfer-Encoding header, waitress would look only for a single string value. According to the HTTP standard, Transfer-Encoding should be a comma-separated list, with the inner-most encoding first, followed by any further transfer codings, ending with 'chunked'. Because of this flaw, requests sent with: "Transfer-Encoding: gzip, chunked" would get ignored, and waitress would use the Content-Length header instead to determine the body size of the HTTP message. A remote attacker could exploit this flaw to force waitress to accept potentially bad HTTP requests or treat a single request as multiple requests in the case of HTTP pipelining.
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2020-01-15 19:33:50 UTC
Waitress through version 1.3.1 would parse the Transfer-Encoding header and only look for a single string value, if that value was not chunked it would fall through and use the Content-Length header instead. According to the HTTP standard Transfer-Encoding should be a comma separated list, with the inner-most encoding first, followed by any further transfer codings, ending with chunked. Requests sent with: "Transfer-Encoding: gzip, chunked" would incorrectly get ignored, and the request would use a Content-Length header instead to determine the body size of the HTTP message. This could allow for Waitress to treat a single request as multiple requests in the case of HTTP pipelining. This issue is fixed in Waitress 1.4.0.

References:
https://github.com/Pylons/waitress/security/advisories/GHSA-g2xc-35jw-c63p
https://docs.pylonsproject.org/projects/waitress/en/latest/#security-fixes

Upstream commit:
https://github.com/Pylons/waitress/commit/f11093a6b3240fc26830b6111e826128af7771c3

Comment 1 Guilherme de Almeida Suckevicz 2020-01-15 19:34:15 UTC
Created python-waitress tracking bugs for this issue:

Affects: epel-all [bug 1791417]
Affects: fedora-all [bug 1791416]
Affects: openstack-rdo [bug 1791418]

Comment 3 Jason Shepherd 2020-01-16 02:40:33 UTC
While Red Hat Quay declares a dependency on python-waitress, it doesn't appear to be used in the code. Setting the impact to low for Red Hat Quay. It may be fixed in a future version.

Comment 5 Summer Long 2020-01-16 05:56:10 UTC
External References:

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

Comment 9 Summer Long 2020-01-17 00:12:55 UTC
Statement:

All affected Red Hat products 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.


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