CVE-2024-23829
JSON

6.5medium

aiohttp's HTTP parser (the python one, not llhttp) still overly lenient about separators

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.03% (higher than 64% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-8qpw-xqxj-h4r2PYSEC-2024-26

Description

aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. Security-sensitive parts of the Python HTTP parser retained minor differences in allowable character sets, that must trigger error handling to robustly match frame boundaries of proxies in order to protect against injection of additional requests. Additionally, validation could trigger exceptions that were not handled consistently with processing of other malformed input. Being more lenient than internet standards require could, depending on deployment environment, assist in request smuggling. The unhandled exception could cause excessive resource consumption on the application server and/or its logging facilities. This vulnerability exists due to an incomplete fix for CVE-2023-47627. Version 3.9.2 fixes this vulnerability.

Affected

Product or packageVersionsReported by
aio-libs aiohttp< 3.9.2CVE List
aiohttp (PyPI)before 3.9.2, before 33ccdfb0a12690af5bb49bda2319ec0907fa7827GitHub Advisory Database, PyPA Advisory Database
aiohttp aiohttpbefore 3.9.2NVD
fedoraproject fedora39NVD

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
PyPA Advisory Database6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Classification

CWE-444

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. Security-sensitive parts of the Python HTTP parser retained minor differences in allowable character sets, that must trigger error handling to robustly match frame boundaries of proxies in order to protect against injection of additional requests. Additionally, validation could trigger exceptions that were not handled consistently with processing of other malformed input. Being more lenient than internet standards require could, depending on deployment environment, assist in request smuggling. The unhandled exception could cause excessive resource consumption on the application server and/or its logging facilities. This vulnerability exists due to an incomplete fix for CVE-2023-47627. Version 3.9.2 fixes this vulnerability.

GitHub Advisory Database
Summary

Security-sensitive parts of the Python HTTP parser retained minor differences in allowable character sets, that must trigger error handling to robustly match frame boundaries of proxies in order to protect against injection of additional requests. Additionally, validation could trigger exceptions that were not handled consistently with processing of other malformed input.

Details

These problems are rooted in pattern matching protocol elements, previously improved by PR #3235 and GHSA-gfw2-4jvh-wgfg:

  1. The expression HTTP/(\d).(\d) lacked another backslash to clarify that the separator should be a literal dot, not just any Unicode code point (result: HTTP/(\d)\.(\d)).

  2. The HTTP version was permitting Unicode digits, where only ASCII digits are standards-compliant.

  3. Distinct regular expressions for validating HTTP Method and Header field names were used - though both should (at least) apply the common restrictions of rfc9110 token.

PoC

GET / HTTP/1枚1 GET / HTTP/1.饾煓 GET/: HTTP/1.1 Content-Encoding?: chunked

Impact

Primarily concerns running an aiohttp server without llhttp:

  1. behind a proxy: Being more lenient than internet standards require could, depending on deployment environment, assist in request smuggling.
  2. directly accessible or exposed behind proxies relaying malformed input: the unhandled exception could cause excessive resource consumption on the application server and/or its logging facilities.

Patch: https://github.com/aio-libs/aiohttp/pull/8074/files

NVD (es)

aiohttp es un framework cliente/servidor HTTP as铆ncrono para asyncio y Python. Las partes sensibles a la seguridad del analizador HTTP de Python conservaron diferencias menores en los conjuntos de caracteres permitidos, que deben activar el manejo de errores para hacer coincidir de manera s贸lida los l铆mites de marco de los servidores proxy para proteger contra la inyecci贸n de solicitudes adicionales. Adem谩s, la validaci贸n podr铆a desencadenar excepciones que no se manejaron de manera consistente con el procesamiento de otras entradas con formato incorrecto. Ser m谩s indulgente de lo que exigen los est谩ndares de Internet podr铆a, seg煤n el entorno de implementaci贸n, ayudar en el contrabando de solicitudes. La excepci贸n no controlada podr铆a causar un consumo excesivo de recursos en el servidor de aplicaciones y/o sus instalaciones de registro. Esta vulnerabilidad existe debido a una soluci贸n incompleta para CVE-2023-47627. La versi贸n 3.9.2 corrige esta vulnerabilidad.

References

https://github.com/aio-libs/aiohttp/security/advisories/GHSA-8qpw-xqxj-h4r2advisory, exploit, patch, vendor-advisory, web
https://github.com/aio-libs/aiohttp/pull/8074fix, patch, web
https://github.com/aio-libs/aiohttp/commit/33ccdfb0a12690af5bb49bda2319ec0907fa7827fix, patch, web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XXWVZIVAYWEBHNRIILZVB3R3SDQNNAA7/article, mailing-list
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ICUOCFGTB25WUT336BZ4UNYLSZOUVKBD/
https://lists.debian.org/debian-lts-announce/2025/02/msg00002.htmlweb
https://github.com/aio-libs/aiohttp/security/advisories/GHSA-gfw2-4jvh-wgfgweb
https://nvd.nist.gov/vuln/detail/CVE-2024-23829advisory
https://github.com/aio-libs/aiohttp/pull/3235web
https://github.com/aio-libs/aiohttp/pull/8074/filesweb
https://github.com/aio-libs/aiohttppackage
https://github.com/pypa/advisory-database/tree/main/vulns/aiohttp/PYSEC-2024-26.yamlweb

Sources

SourceRecordLicence
CVE ListCVE-2024-23829 changed 2025-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-8qpw-xqxj-h4r2 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-23829 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-26 changed 2024-02-06CC-BY-4.0