AIOHTTP: Pure-Python parser request replay and buffer growth behind a declined upgrade
Description
When the pipelined request queue was full, the pure-Python parser stored the unparsed remainder internally and also returned it to the caller. After a handler declined an upgrade request, the buffered data was re-fed, so the buffer grew with each handled request and already-handled requests were dispatched to the application again.
Impact
If users are using the Python parser (AIOHTTP_NO_EXTENSIONS, or not a standard wheel installed), an attacker could cause excessive memory use and cause pipelined requests to be processed more than once.
Workaround
Switch to the default C parser.
---
Patch: github.com/