Jan 6, 2026·6 min read·25 visits
aiohttp used a standard Python list to track HTTP chunk offsets, using `pop(0)` to retrieve them. Since `pop(0)` is an O(N) operation, processing a request with N chunks resulted in O(N^2) complexity. An attacker sending a stream of 1-byte chunks can monopolize the CPU, blocking the event loop and denying service to all other clients.
A high-impact Denial of Service vulnerability in the aiohttp Python library caused by algorithmic complexity in handling HTTP chunked transfer encoding. By flooding the server with thousands of tiny chunks, an attacker can trigger quadratic CPU consumption, effectively freezing the asynchronous event loop.
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/E:U| Product | Affected Versions | Fixed Version |
|---|---|---|
aiohttp aio-libs | <= 3.13.2 | 3.13.3 |
| Attribute | Detail |
|---|---|
| CWE | CWE-770 (Allocation of Resources Without Limits) |
| Attack Vector | Network |
| CVSS v4.0 | 6.6 (Medium) |
| Complexity | O(N^2) Quadratic |
| Impact | Denial of Service (Event Loop Block) |
| Status | Fixed in 3.13.3 |
The software allocates resources (memory, CPU) without limits or throttling based on the quantity of input metadata, allowing an attacker to cause resource exhaustion.