CVE-2022-24761
JSON

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 packageVersionsReported by
Pylons waitress< 2.1.1CVE List
waitress (PyPI)before 2.1.1, before 9e0b8c801e4d505c2ffc91b891af4ba48af715e0GitHub Advisory Database, PyPA Advisory Database
agendaless waitressbefore 2.1.1NVD
debian debian_linux9.0NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:P/A:N

Classification

CWE-444

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 +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.
  • 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:

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

Sources

SourceRecordLicence
CVE ListCVE-2022-24761 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-4f7p-27jc-3c36 changed 2024-11-19CC-BY-4.0
NVDCVE-2022-24761 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2022-169 changed 2023-11-08CC-BY-4.0