Contents
A single 1,260-byte write to an aiohttp 3.14.3 server running the pure-Python HTTP parser pushed the process to a 1.5 GB memory limit in 1.3 seconds. The route it hit was an ordinary GET handler that returned "ok". The bug is CVE-2026-128130, published on November 13 and fixed in aiohttp 3.14.4.
Only the pure-Python parser has this bug, so most aiohttp deployments, which load the compiled llhttp parser, were never exposed to the memory growth. What matters more is a packaging change in the same release. 3.14.4 is the first aiohttp version on PyPI with a py3-none-any wheel. On a CPython host that has no matching binary wheel, pip used to build the sdist, which compiles the C parser. Now pip installs the pure-Python wheel instead. So the upgrade your scanner asks for can move a service onto the parser this CVE is about.
Two parsers, picked at import time
aiohttp has a C parser built on llhttp (aiohttp._http_parser) and a pure-Python parser in aiohttp/http_parser.py. The choice happens at the bottom of http_parser.py:
HttpRequestParserPy = HttpRequestParser
...
try:
if not NO_EXTENSIONS:
from ._http_parser import (
HttpRequestParser,
HttpResponseParser,
RawRequestMessage,
RawResponseMessage,
)
...
except ImportError: # pragma: no cover
pass
NO_EXTENSIONS comes from the AIOHTTP_NO_EXTENSIONS environment variable. If that is unset and the compiled module is missing, the ImportError is swallowed and the Python class stays in place. Nothing is logged.
setup.py forces NO_EXTENSIONS = True when sys.implementation.name != "cpython", so PyPy installs have always used the Python parser. On CPython, building the sdist compiles the extensions, and if there is no compiler the install fails rather than falling back.
What the bug does
The advisory and PR #13356 explain the mechanism. The server keeps at most MAX_MSG_QUEUE_SIZE = 32 parsed but unhandled pipelined requests per connection, then pauses reading. When the queue filled, the pure-Python parser saved the unparsed remainder in self._tail and also returned it to the caller. On the next feed_data() it prepends self._tail, so a caller that passed the returned bytes back in fed the same data twice.
data_received() throws the returned tail away unless the request was an upgrade, so normal pipelining was fine. finish_response() kept it. That path runs when a request carries Connection: Upgrade and Upgrade: headers and the handler answers with a normal response. The handler doesn’t need to know anything about WebSockets. A plain route that ignores the headers counts as declining the upgrade.
The 3.14.4 fix is short. The parser now sets data = EMPTY after storing the remainder, and finish_response() pauses reading when the queue fills again, as data_received() already did.
A reproduction
The script sends one GET with Connection: Upgrade and Upgrade: websocket, followed by N plain GETs, all in one TCP write, to a server with one catch-all GET route. It counts responses and handler calls for up to 5 seconds, under a 1.5 GB address-space limit. These runs used Python 3.11 on Linux x86_64, with the C parser selected by default and the Python parser forced with AIOHTTP_NO_EXTENSIONS=1:
| aiohttp | Parser | GETs behind the upgrade | Result |
|---|---|---|---|
| 3.14.3 | C | 40 | 33 of 41 requests answered, then the connection stalled |
| 3.14.3 | Python | 30 to 32 | All answered once |
| 3.14.3 | Python | 33 | 15,387 handler calls for 34 distinct requests in 5 s |
| 3.14.3 | Python | 34, 36, 40 | Peak RSS of 1.1 to 1.5 GB within 1.3 to 2.9 s; at 40, MemoryError raised in finish_response() |
| 3.14.4 | C | 40 | Every request answered once, RSS about 34 MB |
| 3.14.4 | Python | 33, 40 | Every request answered once, RSS about 34 MB |
Both failure modes in the advisory show up. With exactly one request more than the queue holds, the remainder is replayed in a loop and the application receives the same requests thousands of times. For a route with side effects, that is a write repeated thousands of times, not just wasted CPU. With a few more, the buffer grows by a copy of itself on each handled request until the process runs out of memory. One unauthenticated client and one write are enough.
The first row is easy to overlook. The C parser never returned the tail, but because finish_response() didn’t pause reading, requests past the queue limit were never answered. The PR reports the same 33 of 41. That isn’t part of the CVE, but 3.14.4 fixes it too.
The scores differ depending on where you look. The GitHub advisory page labels the issue Moderate. The CVE record, filed by GitHub as CNA, carries a CVSS 4.0 base score of 8.3 (High), AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:H. A scanner that uses the CVE score shows High for any aiohttp below 3.14.4, including installs that use the C parser and can’t reach the bug. That’s still a reason to upgrade, just not a reason to page anyone.
The wheel that changes which parser you install
The 3.14.4 changelog has this under “Packaging updates and notes for downstreams”:
Started publishing an additional pure-Python wheel alongside the existing per-platform binary wheels and the
sdist
The PyPI file lists confirm it. Every release up to 3.14.3 shipped binary wheels and an sdist, with no py3-none-any file. 3.14.4 and 3.14.5 each include aiohttp-<version>-py3-none-any.whl. That wheel contains _http_parser.pyx but no compiled .so, and its WHEEL metadata says Root-Is-Purelib: true and Tag: py3-none-any.
The binary wheels cover CPython 3.10 to 3.15, including free-threaded 3.14t and 3.15t, on manylinux and musllinux for x86_64, aarch64, armv7l, ppc64le, s390x and riscv64, plus macOS and Windows, and iOS and Android from 3.13. A CPython host outside that matrix, such as FreeBSD or a Linux architecture not in the list, used to fall through to the sdist. If a compiler was available, it got the C parser.
pip prefers a compatible wheel to an sdist of the same version. With a --find-links directory holding only the 3.14.4 sdist and the py3-none-any wheel, which is what such a host sees, pip 26.3 chose the wheel:
$ pip install --dry-run --no-index --find-links idx --no-deps aiohttp==3.14.4
Processing ./idx/aiohttp-3.14.4-py3-none-any.whl
Would install aiohttp-3.14.4
Adding --no-binary aiohttp made it select aiohttp-3.14.4.tar.gz instead. When a dependency bot bumps aiohttp on one of those hosts, the service goes from the C parser to the Python parser with no error and nothing in the logs. The 3.14.4 copy of the Python parser has this CVE fixed, so the switch doesn’t reintroduce the bug above. My objection is to the switch happening silently. Both parsers get bug fixes, but 3.14.4 closes two security advisories that apply only to the Python parser: this CVE and GHSA-pqxq-w44r-73xw, a request-smuggling bug rated Low. For both, the advisory’s workaround is to switch to the C parser. A team that chose aiohttp’s default parser should not lose it because of a packaging change it never saw.
What to check
Assert the parser at startup. This is the most direct check, and it catches every route to the Python parser: a missing binary wheel, PyPy, or an AIOHTTP_NO_EXTENSIONS someone set in a base image:
import aiohttp.http_parser as hp
if hp.HttpRequestParser.__module__ != "aiohttp._http_parser":
raise RuntimeError("aiohttp is running the pure-Python HTTP parser")
With the C extension loaded, __module__ is aiohttp._http_parser. With the Python parser it is aiohttp.http_parser. Whether to raise or only log is your call, but at minimum the value should appear in your startup logs, so a parser change shows up in a diff of deploy output.
To audit what is already installed, read the wheel tag:
python -c "import importlib.metadata as m; print(m.distribution('aiohttp').read_text('WHEEL'))"
Tag: py3-none-any means the pure-Python wheel. A platform tag such as cp311-cp311-manylinux_2_17_x86_64 means a binary wheel.
If a host has no binary wheel and you want the C parser, install with --no-binary aiohttp and keep a compiler in the build stage. That is how those hosts got the C parser before 3.14.4.
Upgrade to 3.14.5, the current release, which includes the 3.14.4 fixes. Don’t count on a reverse proxy to block this. Whether it helps depends on whether the proxy passes Upgrade headers through and how it sends pipelined client requests to the backend. Check your proxy’s behavior before relying on it.
Sources
- GHSA-28qf-cpwq-vmc2: Pure-Python parser request replay and buffer growth behind a declined upgrade
- CVE-2026-128130 record and NVD entry
- aiohttp PR #13356: Stop handing back pipelined requests the parser buffered
- aiohttp 3.14.4 release and CHANGES.rst at v3.14.4
- GHSA-pqxq-w44r-73xw: Pure-Python parser request smuggling
- aiohttp file lists on PyPI
- aiohttp source at v3.14.4:
http_parser.py,web_protocol.py,setup.py