Advisories for Pypi/Waitress package

2022

Uncaught Exception

Waitress is a Web Server Gateway Interface server for Python 2 and 3. Waitress versions 2.1.0 and 2.1.1 may terminate early due to a thread closing a socket while the main thread is about to call select(). This will lead to the main thread raising an exception that is not handled and then causing the entire application to be killed. This issue has been fixed in Waitress 2.1.2 by no …

Inconsistent Interpretation of HTTP Requests ('HTTP Request Smuggling')

Waitress is a Web Server Gateway Interface server for Python 2 and 3. When using Waitress versions 2.1.0 and prior behind a proxy that does not properly validate the incoming HTTP request matches the RFC7230 standard, Waitress and the frontend proxy may disagree on where one request starts and where it ends. This would allow requests to be smuggled via the front-end proxy to waitress and later behavior. There are …

2020

Uncontrolled Resource Consumption

Waitress version allows a DoS attack when waitress receives a header that contains invalid characters. When a header similar to Bad-header: xxxxxxxxxxxxxxx\x10 is received, it will cause the regular expression engine to catastrophically backtrack causing the process to use % 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.

Inconsistent Interpretation of HTTP Requests (HTTP Request Smuggling)

Waitress allows request smuggling by sending the Content-Length header twice. Waitress would header fold a double Content-Length header and due to being unable to cast the now comma separated value to an integer would set the Content-Length to 0 internally. If two Content-Length headers are sent in a single request, Waitress treats the body of the request as a new request in HTTP pipelining.

Inconsistent Interpretation of HTTP Requests

In Waitress through version 1.4.0, if a proxy server is used in front of waitress, an invalid request may be sent by an attacker that bypasses the front-end and is parsed differently by waitress leading to a potential for HTTP request smuggling. Specially crafted requests containing special whitespace characters in the Transfer-Encoding header would get parsed by Waitress as being a chunked request, but a front-end server would use the …

2019

Inconsistent Interpretation of HTTP Requests (HTTP Request Smuggling)

Waitress implemented an optional part of the RFC7230 which states: "Although the line terminator for the start-line and header fields is the sequence CRLF, a recipient may recognize a single LF as a line terminator and ignore any preceding CR." Unfortunately if a front-end server does not parse header fields with an LF the same way as it does those with a CRLF it can lead to the front-end and …

Inconsistent Interpretation of HTTP Requests (HTTP Request Smuggling)

Waitress 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 …