Vulnerability · Published Nov 18, 2024 · Assigned by GitHub_M
CVE-2024-52303aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method
High 7.5
In plain English
A high-severity security flaw in aiohttp from aio-libs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | python-aiohttp | 3.10.11-1 | DEBIAN-CVE-2024-52303 |
| Debian:14 | python-aiohttp | 3.10.11-1 | DEBIAN-CVE-2024-52303 |
| PyPI | aiohttp | 3.10.11 | GHSA-27mf-ghqm-j3j8 |
| PyPI | aiohttp | 3.10.11 | PYSEC-2026-1096 |
| Ubuntu:22.04:LTS | python-aiohttp | no fix listed | UBUNTU-CVE-2024-52303 |
| Ubuntu:24.04:LTS | python-aiohttp | no fix listed | UBUNTU-CVE-2024-52303 |
Affected products (as reported)
Weakness: CWE-772 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H