8.7high
aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method
- Severity
- 8.7high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.59% (higher than 49% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-27mf-ghqm-j3j8PYSEC-2026-1096
Description
aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. In versions starting with 3.10.6 and prior to 3.10.11, a memory leak can occur when a request produces a MatchInfoError. This was caused by adding an entry to a cache on each request, due to the building of each MatchInfoError producing a unique cache entry. An attacker may be able to exhaust the memory resources of a server by sending a substantial number (100,000s to millions) of such requests. Those who use any middlewares with aiohttp.web should upgrade to version 3.10.11 to receive a patch.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| aio-libs aiohttp | >= 3.10.6, < 3.10.11 | CVE List |
| aiohttp aio-libs | from 3.10.6 before 3.10.11 | CVE List |
| aiohttp (PyPI) | from 3.10.6 before 3.10.11 | GitHub Advisory Database, PyPA Advisory Database |
| aiohttp aiohttp | from 3.10.6 before 3.10.11 | NVD |
All scores
| GitHub_M | 8.7high CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N |
| CISA-ADP | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
| PyPA Advisory Database | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
Classification
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. In versions starting with 3.10.6 and prior to 3.10.11, a memory leak can occur when a request produces a MatchInfoError. This was caused by adding an entry to a cache on each request, due to the building of each MatchInfoError producing a unique cache entry. An attacker may be able to exhaust the memory resources of a server by sending a substantial number (100,000s to millions) of such requests. Those who use any middlewares with aiohttp.web should upgrade to version 3.10.11 to receive a patch.
GitHub Advisory Database
Summary
A memory leak can occur when a request produces a MatchInfoError. This was caused by adding an entry to a cache on each request, due to the building of each MatchInfoError producing a unique cache entry.
Impact
If the user is making use of any middlewares with aiohttp.web then it is advisable to upgrade immediately.
An attacker may be able to exhaust the memory resources of a server by sending a substantial number (100,000s to millions) of such requests.
Patch: https://github.com/aio-libs/aiohttp/commit/bc15db61615079d1b6327ba42c682f758fa96936
NVD (es)
aiohttp es un framework de trabajo de cliente/servidor HTTP asincrónico para asyncio y Python. En las versiones a partir de la 3.10.6 y anteriores a la 3.10.11, puede producirse una pérdida de memoria cuando una solicitud produce un MatchInfoError. Esto se debía a que se añadía una entrada a una memoria caché en cada solicitud, debido a que la creación de cada MatchInfoError producía una entrada de memoria caché única. Un atacante podría agotar los recursos de memoria de un servidor enviando una cantidad sustancial (entre cientos y millones) de dichas solicitudes. Quienes utilicen cualquier middleware con aiohttp.web deberían actualizar a la versión 3.10.11 para recibir un parche.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-52303 changed 2024-11-19 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-27mf-ghqm-j3j8 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-52303 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1096 changed 2026-07-07 | CC-BY-4.0 |