7.5high
HTTP Request Smuggling in waitress
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 1.78% (higher than 78% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4f7p-27jc-3c36PYSEC-2022-169
Description
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 two classes of vulnerability that may lead to request smuggling that are addressed by this advisory: The use of Python's `int()` to parse strings into integers, leading to `+10` to be parsed as `10`, or `0x01` to be parsed as `1`, where as the standard specifies that the string should contain only digits or hex digits; and Waitress does not support chunk extensions, however it was discarding them without validating that they did not contain illegal characters. This vulnerability has been patched in Waitress 2.1.1. A workaround is available. When deploying a proxy in front of waitress, turning on any and all functionality to make sure that the request matches the RFC7230 standard. Certain proxy servers may not have this functionality though and users are encouraged to upgrade to the latest version of waitress instead.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Pylons waitress | < 2.1.1 | CVE List |
| waitress (PyPI) | before 2.1.1, before 9e0b8c801e4d505c2ffc91b891af4ba48af715e0 | GitHub Advisory Database, PyPA Advisory Database |
| agendaless waitress | before 2.1.1 | NVD |
| debian debian_linux | 9.0 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| GitHub | high CVSS:4.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 |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:N/I:P/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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 two classes of vulnerability that may lead to request smuggling that are addressed by this advisory: The use of Python's `int()` to parse strings into integers, leading to `+10` to be parsed as `10`, or `0x01` to be parsed as `1`, where as the standard specifies that the string should contain only digits or hex digits; and Waitress does not support chunk extensions, however it was discarding them without validating that they did not contain illegal characters. This vulnerability has been patched in Waitress 2.1.1. A workaround is available. When deploying a proxy in front of waitress, turning on any and all functionality to make sure that the request matches the RFC7230 standard. Certain proxy servers may not have this functionality though and users are encouraged to upgrade to the latest version of waitress instead.
GitHub Advisory Database
Impact
When using Waitress 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 two classes of vulnerability that may lead to request smuggling that are addressed by this advisory:
- The use of Python's
int()to parse strings into integers, leading to+10to be parsed as10, or0x01to be parsed as1, where as the standard specifies that the string should contain only digits or hex digits. - Waitress does not support chunk extensions, however it was discarding them without validating that they did not contain illegal characters
Patches
This has been fixed in Waitress 2.1.1
Workarounds
When deploying a proxy in front of waitress, turning on any and all functionality to make sure that the request matches the RFC7230 standard. Certain proxy servers may not have this functionality though and users are encouraged to upgrade to the latest version of waitress instead.
References
For more information
If you have any questions or comments about this advisory:
- Open an issue in the Github issue tracker (if not security related/sensitive)
- Email us at pylons-project-security@googlegroups.com (If security related or sensitive)
NVD (es)
Waitress es un servidor de Interfaz de Puerta de Entrada de Servidores Web para Python 2 y 3. Cuando son usadas las versiones 2.1.0 y anteriores de Waitress detrás de un proxy que no comprueba inapropiadamente una petición HTTP entrante coincide con el estándar RFC7230, Waitress y el proxy del front-end pueden no estar de acuerdo en dónde empieza una petición y dónde termina. Esto permitiría contrabandear peticiones por medio del proxy del front-end a Waitress y su posterior comportamiento. Se presentan dos clases de vulnerabilidad que pueden conllevar a un contrabando de peticiones que son abordadas en este aviso: El uso de "int()`"de Python para analizar cadenas en enteros, conllevando a que "+10" sea analizado como "10", o que "0x01" sea analizado como "1", cuando el estándar especifica que la cadena debe contener sólo dígitos o dígitos hexadecimales; y que Waitress no soporta extensiones de chunk, sin embargo las estaba descartando sin comprender que no contenían caracteres ilegales. Esta vulnerabilidad ha sido parcheada en Waitress versión 2.1.1. Se presenta una medida de mitigación disponible. Cuando despliegue un proxy frente a Waitress, habilite todas las funciones para asegurarse de que la petición es ajustada al estándar RFC7230. Sin embargo, algunos servidores proxy pueden no tener esta funcionalidad y es recomendado a usuarios actualizar a la última versión de waitress en su lugar
References
| https://github.com/Pylons/waitress/security/advisories/GHSA-4f7p-27jc-3c36 | advisory, third-party-advisory, web | |
| https://github.com/Pylons/waitress/commit/9e0b8c801e4d505c2ffc91b891af4ba48af715e0 | fix, patch, release-notes, third-party-advisory, web | |
| https://github.com/Pylons/waitress/releases/tag/v2.1.1 | release-notes, third-party-advisory, web | |
| https://lists.debian.org/debian-lts-announce/2022/05/msg00011.html | mailing-list, third-party-advisory, web | |
| https://www.debian.org/security/2022/dsa-5138 | third-party-advisory, vendor-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-24761 | advisory | |
| https://github.com/Pylons/waitress | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/waitress/PYSEC-2022-169.yaml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-24761 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4f7p-27jc-3c36 changed 2024-11-19 | CC-BY-4.0 |
| NVD | CVE-2022-24761 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2022-169 changed 2023-11-08 | CC-BY-4.0 |