Yaamlabs

Vulnerabilities

aiohttp 3.14.4 fixes four denial-of-service flaws

Four aiohttp flaws let one crafted request stall an event loop or slip past the body-size limit. What each does and how to find and patch aiohttp in your stack.

On November 8, 2026 the maintainers of aiohttp, the asynchronous HTTP client and server library for Python that sits under a large share of API backends, web services and bots, published four security advisories and shipped the fix in version 3.14.4. None of the four involves remote code execution. All four are availability problems, a form of denial-of-service (DoS): a single crafted request, or a single hostile response, can tie up the worker that handles it.

That matters more for aiohttp than it would for a thread-per-request server. aiohttp runs on asyncio, so one worker process handles many connections on a single event loop. Work that blocks that loop blocks every other connection the worker is serving. Two of the four flaws let an unauthenticated request do exactly that, and a third lets a request slip past the body-size limit you thought was protecting you. Plenty of teams run aiohttp without having chosen it, because something they depend on pulled it in, so the first job is to find out whether it is in your stack at all.

What each flaw does

CVE-2026-128127 (CVSS 4.0 score 8.7) is the one to fix first. When a multipart upload declares Content-Transfer-Encoding: base64, aiohttp's BodyPartReader.read_chunk() kept reading until the chunk length was a multiple of four, with no ceiling on how much it pulled in. A part with a short declared length, or padded with a long run of whitespace, makes the server load the whole remaining request body into memory in one call before any size check runs. That bypasses client_max_size, the setting most people rely on to cap request bodies, so the limit you configured never applies. Any handler that reads multipart data is in scope.

CVE-2026-128126 (CVSS 4.0 score 8.7) is the URL-encoded cousin. Request.post() placed no limit on the number of fields in a form body, and inserting many repeated keys into the MultiDict it builds takes time that grows with the square of the field count. A form POST that stays under the default client_max_size can still carry enough fields to pin the event loop at full processor use while the parser grinds through them. Any handler that calls Request.post(), directly or through a framework built on aiohttp, is affected.

CVE-2026-128124 (CVSS 4.0 score 8.2) only bites servers that use Application.add_domain() with host masks. Each asterisk in a mask became a greedy regular expression fragment, so a mask with two or more wildcards could take polynomial time to match against a long Host header that does not fit it. An attacker sending such headers stalls the loop. If you cannot upgrade immediately and you use domain masks, the maintainers' workaround is to keep at most one wildcard per mask.

CVE-2026-128125 (CVSS 4.0 score 6.3) is on the client side. aiohttp's cookie handling treated unrecognised name=value attributes in a Set-Cookie header as extra cookies, and the CookieJar put no cap on how many it stored or sent. A malicious or compromised server can make an aiohttp client store a huge number of cookies, burning memory and processor time, and the effect repeats on every redirect. Later requests to that domain can also carry oversized Cookie headers. If you use aiohttp to call out to third-party services, this is the one that reaches you.

Why a stalled event loop is an outage

A traditional web server gives each request its own thread, so a slow request mostly slows itself. aiohttp does not work that way. One worker process runs a single event loop that juggles hundreds or thousands of connections by switching between them whenever one is waiting on the network. The model depends on every callback returning quickly. When a callback does not, because it is parsing a form with a million fields or matching a pathological regular expression, the loop cannot switch, and every other connection on that worker waits behind it. The open requests on that worker hang, its health check can fail so the load balancer cycles it onto the others, and because the blocked code sits in shared request parsing, endpoints that have nothing to do with the attack stall alongside it. One request stalls the lot.

That is why these rate as serious even without code execution. An attacker needs no login, no payload and no second stage. One request to a public endpoint, repeated a few times a second, is enough to make a worker stop answering. If you run a handful of workers behind a load balancer, a steady trickle of these requests drains the whole pool. The memory bypass in CVE-2026-128127 adds a second route to the same outcome: send enough oversized bodies at once and the process is killed by the operating system's out-of-memory (OOM) killer rather than merely stalled.

What to do

  1. Upgrade to aiohttp 3.14.4. It carries all four fixes and is the version to pin.
  2. Find out where aiohttp runs. On a live environment, pip show aiohttp prints the installed version. Because aiohttp is so often a transitive dependency, read your lockfiles too: grep -n aiohttp poetry.lock, uv pip list | grep aiohttp, or a search through requirements.txt and Pipfile.lock. A service you did not know used aiohttp still needs the bump.
  3. Keep body-size and field-count limits at the reverse proxy as a second layer. A cap on request body size and on the number of form fields at nginx or your ingress controller blunts the multipart and form-field attacks even where a service lags on the upgrade. This matters because client_max_size alone did not hold against CVE-2026-128127, so a limit that lives outside the application is worth having.
  4. Watch per-worker processor and memory use. The form-parsing and multipart flaws show up as one worker pinned at full processor use, or climbing memory, while request latency across the whole process spikes. A single worker stuck at 100 percent with no matching rise in request volume is the signature.
  5. For the client-side cookie flaw, the same upgrade fixes it. There is no safe way to keep an old client talking to a server you do not control.

Most teams will spend more time on step 2 than on the upgrade itself, because the dependency is buried. A library you never chose, pinned three levels down in a lockfile, is exactly the kind of thing that ships to production and sits unpatched for months. Auditing what your lockfiles actually resolve to, not just what your top-level requirements name, is the habit that catches this whole class of problem.

If you want a second set of eyes on how your services read request bodies and where your size limits actually apply, that is the sort of thing our red team code review looks for, and our platform and cloud engineering work puts the proxy-level limits and per-worker monitoring in place. Open the chat and Yaali, our AI agent, will pass your question to the engineer who would do the work.


Sources: aiohttp advisory GHSA-24c4-3p7v-29cm (CVE-2026-128127), aiohttp advisory GHSA-xgw8-8ccx-rmqh (CVE-2026-128126), aiohttp advisory GHSA-jm3w-gw2p-xjfj (CVE-2026-128124), aiohttp advisory GHSA-5pv8-vvhc-h7jv (CVE-2026-128125), NVD CVE-2026-128127, NVD CVE-2026-128126, NVD CVE-2026-128124, NVD CVE-2026-128125. </content> </invoke>

Back to the blog, or read this post on the full site.