CVE-2019-16789
📋 TL;DR
CVE-2019-16789 is an HTTP request smuggling vulnerability in Waitress web server versions through 1.4.0. Attackers can send specially crafted requests with invalid whitespace in Transfer-Encoding headers that bypass front-end proxies and get parsed differently by Waitress, potentially leading to request splitting. This affects any deployment using Waitress behind a proxy server with HTTP pipelining enabled.
💻 Affected Systems
- Waitress
📦 What is this software?
Communications Cloud Native Core Network Function Cloud Native Environment by Oracle
View all CVEs affecting Communications Cloud Native Core Network Function Cloud Native Environment →
Fedora by Fedoraproject
Fedora by Fedoraproject
Openstack by Redhat
Waitress by Agendaless
⚠️ Risk & Real-World Impact
Worst Case
Cache poisoning leading to credential theft, session hijacking, or injection of malicious content to other users
Likely Case
Information disclosure through request splitting, potential for cache poisoning in vulnerable configurations
If Mitigated
Limited impact if proper proxy validation and request sanitization are in place
🎯 Exploit Status
Exploitation requires specific proxy configuration and knowledge of HTTP request smuggling techniques
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Waitress 1.4.1 and later
Vendor Advisory: https://docs.pylonsproject.org/projects/waitress/en/latest/#security-fixes
Restart Required: Yes
Instructions:
1. Upgrade Waitress to version 1.4.1 or later using pip: 'pip install waitress>=1.4.1' 2. Restart all Waitress services 3. Verify the upgrade with 'waitress-serve --version'
🔧 Temporary Workarounds
Disable HTTP Pipelining
allConfigure front-end proxy servers to disable HTTP pipelining to Waitress backend
# For nginx: proxy_http_version 1.0;
# For Apache: SetEnv proxy-nokeepalive 1
Strict Header Validation
linuxConfigure proxy servers to reject requests with invalid whitespace in Transfer-Encoding headers
# Example nginx location block: if ($http_transfer_encoding ~* "[\t\n\r\f\v]") { return 400; }
🧯 If You Can't Patch
- Deploy a WAF or reverse proxy with strict HTTP header validation in front of Waitress
- Monitor for unusual HTTP request patterns and implement rate limiting
🔍 How to Verify
Check if Vulnerable:
Check Waitress version: 'waitress-serve --version' or 'pip show waitress' - if version is 1.4.0 or earlier, system is vulnerable
Check Version:
waitress-serve --version || python -c "import waitress; print(waitress.__version__)"
Verify Fix Applied:
Verify version is 1.4.1 or later and test with crafted requests containing whitespace in Transfer-Encoding headers
📡 Detection & Monitoring
Log Indicators:
- Multiple requests from single connection with malformed Transfer-Encoding headers
- Unexpected 400/500 errors from Waitress with unusual header patterns
Network Indicators:
- HTTP requests with whitespace characters (\t, \n, \r, \f, \v) in Transfer-Encoding headers
- Request splitting patterns in HTTP traffic
SIEM Query:
source="waitress.log" AND ("Transfer-Encoding" AND ("\t" OR "\n" OR "\r" OR "\f" OR "\v"))
🔗 References
- https://access.redhat.com/errata/RHSA-2020:0720
- https://docs.pylonsproject.org/projects/waitress/en/latest/#security-fixes
- https://github.com/Pylons/waitress/commit/11d9e138125ad46e951027184b13242a3c1de017
- https://github.com/github/advisory-review/pull/14604
- https://lists.debian.org/debian-lts-announce/2022/05/msg00011.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GVDHR2DNKCNQ7YQXISJ45NT4IQDX3LJ7/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LYEOTGWJZVKPRXX2HBNVIYWCX73QYPM5/
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://access.redhat.com/errata/RHSA-2020:0720
- https://docs.pylonsproject.org/projects/waitress/en/latest/#security-fixes
- https://github.com/Pylons/waitress/commit/11d9e138125ad46e951027184b13242a3c1de017
- https://github.com/github/advisory-review/pull/14604
- https://lists.debian.org/debian-lts-announce/2022/05/msg00011.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GVDHR2DNKCNQ7YQXISJ45NT4IQDX3LJ7/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LYEOTGWJZVKPRXX2HBNVIYWCX73QYPM5/
- https://www.oracle.com/security-alerts/cpuapr2022.html