CVE-2026-128130 affects the AIOHTTP Python library when using its pure-Python HTTP parser. The vulnerability causes the internal request buffer to grow uncontrollably when an upgrade request is declined, leading to excessive memory consumption and repeated processing of pipelined requests. This impacts users relying on the pure-Python parser instead of the default C parser. The issue is fixed in version 14.5.0.
AIOHTTP versions 14.0.0 through 14.4.x have a vulnerability where data received during an HTTP upgrade request (such as a WebSocket handshake) is buffered without any size limit or flow control until the upgrade handler completes. This can lead to unbounded memory consumption if an attacker streams large amounts of data behind the upgrade request. The issue is fixed in version 14.5.0.
### Summary
The `max_msg_size` check in the WebSocket reader added the declared frame length to the size of the partial message already buffered. In the C extension this addition is 64-bit arithmetic, so a declared length close to 2**63 overflowed and the check passed.
### Impact
An attacker could bypass `max_msg_size` and cause unbounded memory use by streaming an oversized WebSocket message after a small non-final fragment.
### Workaround
If unable to upgrade, the Python reader is unaffected and can be used with `AIOHTTP_NO_EXTENSIONS=1`.
---
Patch: https://github.com/aio-libs/aiohttp/commit/8cfbe9abe5e11b84006a10f9bdf82bf607671dab
### Summary
When reading a multipart part with `Content-Transfer-Encoding: base64`, `BodyPartReader.read_chunk()` kept reading until the chunk length was a multiple of 4, with no byte limit. A part with a short `Content-Length`, or a long run of whitespace, could cause the entire remaining body to be read into memory within a single call before any size check, or spin on the event loop.
### Impact
An attacker could bypass `client_max_size` to cause excessive memory use, or block the event loop, with a specially crafted multipart request to any handler that reads multipart data.
---
Patch: https://github.com/aio-libs/aiohttp/commit/a555ab698e08e9baea7386d5b4c0761cb8956fdd
### Summary
`Request.post()` had no limit on the number of fields in a URL-encoded form body. Inserting a large number of repeated keys into a `MultiDict` took quadratic time on the event loop.
### Impact
An attacker could block the event loop with a form POST within the default `client_max_size` to any handler that calls `Request.post()`.
---
Patch: https://github.com/aio-libs/aiohttp/commit/615fec3d4f088f30d2ee72cad760152e92aa1c53
### Summary
`Set-Cookie` parsing created additional cookies from unrecognised `name=value` attributes, and `CookieJar` had no limit on the number of cookies stored or sent. A server could make the client store a very large number of cookies and generate very large `Cookie` headers.
### Impact
A malicious server could cause excessive memory and CPU use in a client, repeated on every redirect, and cause later requests to the same domain to build an excessively large `Cookie` header.
---
Patch: https://github.com/aio-libs/aiohttp/commit/6963ee0befec1502b6bb7b4db6c72d044c08f4fa
### Summary
`Application.add_domain()` compiled each `*` in a host mask to `[^:]*`. With two or more wildcards in a mask, matching a long `Host` header that does not match the mask took polynomial time on the event loop.
### Impact
An attacker could stall a server that registers a domain mask with more than one wildcard by sending requests with a long `Host` header.
### Workaround
Use at most one `*` in a domain mask.
---
Patch: https://github.com/aio-libs/aiohttp/commit/c6ac0e44c3c573ff9616f4a6a532992538b31e43
### Summary
The WebSocket reader continued parsing frames already received after the receive queue had paused the transport, and empty messages were not counted towards the queue size. With permessage-deflate, a single read of compressed frames could add many megabytes of decompressed messages to the queue.
### Impact
An attacker could cause excessive memory use in a WebSocket server, or a malicious server against a client, by sending many small or compressed messages faster than the application consumes them.
---
Patch: https://github.com/aio-libs/aiohttp/commit/0ae507423f681161efa77d20052b4054397c7fb6
### Summary
When decompressing a payload made up of many concatenated compressed members (gzip, deflate or zstd), each member was decoded by passing the entire remaining input to a new decompressor, resulting in quadratic CPU time. Empty members produce no output, so `client_max_size` and output backpressure did not limit the work.
### Impact
An attacker could block the event loop of a server with a specially crafted compressed request body or WebSocket message. A malicious server could do the same to a client.
---
Patch: https://github.com/aio-libs/aiohttp/commit/d925a80539ffd227da1d93ab4a5bff123cc777db