Inconsistent interpretation of HTTP requests in waitress - CVE-2019-16786

 

Inconsistent interpretation of HTTP requests in waitress - CVE-2019-16786

Published: December 21, 2019 / Updated: July 17, 2020


Vulnerability identifier: #VU30507
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2019-16786
CWE-ID: CWE-444
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Pylons Project
Affected software:
waitress

Detailed vulnerability description

The vulnerability allows a remote non-authenticated attacker to manipulate data.

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.


How to mitigate CVE-2019-16786

Install update from vendor's website.

Sources