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: CLOSED ERRATA
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 1791490 1793268 1793269
Blocks: 1791419
TreeView+ depends on / blocked
 
Reported: 2020-01-15 19:33 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-02-16 20:45 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: 2020-03-05 16:31:58 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:0720 0 None None None 2020-03-05 11:58:22 UTC
Red Hat Product Errata RHSA-2021:0420 0 None None None 2021-02-04 16:14:31 UTC

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 11 errata-xmlrpc 2020-03-05 11:58:06 UTC
This issue has been addressed in the following products:

  Red Hat OpenStack Platform 15.0 (Stein)

Via RHSA-2020:0720 https://access.redhat.com/errata/RHSA-2020:0720

Comment 12 Product Security DevOps Team 2020-03-05 16:31:58 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2019-16786

Comment 14 Summer Long 2021-01-14 05:48:20 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.

In Red Hat OpenStack Platform 13,  because the flawed code is not used and the fix would require a substantial amount of development, no update will be provided at this time for the RHOSP13 python-waitress package.

Comment 15 errata-xmlrpc 2021-02-04 16:14:30 UTC
This issue has been addressed in the following products:

  Red Hat Quay 3

Via RHSA-2021:0420 https://access.redhat.com/errata/RHSA-2021:0420


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