Tornado: Event loop blocking and excess memory use from chunked bodies with many small chunks
Summary
When Tornado reads an HTTP/1.1 body that uses chunked transfer encoding, it processes all chunks that have already arrived without yielding to the event loop. A client can send a body made of millions of 1-byte chunks, which blocks the event loop (and therefore every other connection served by that process) for the entire time it takes to parse the body. A body near the default max_body_size of 100 MB can block the process for close to a minute, and the attacker can repeat or parallelize these requests.
Bodies made of tiny chunks also consumed far more memory than their size: a handler that does not use @stream_request_body stored each chunk as a separate object, using roughly 20 times as much memory as the bytes received.
Impact
All Tornado HTTP servers are affected when they receive a request body for a handler that reads it, which includes any handler that does not reject the request before the body is read. No authentication is required. Lowering max_body_size reduces the maximum blocking time and memory use for each request but does not remove the issue.
SimpleAsyncHTTPClient is affected in the same way when it reads a response from a malicious server.
Patches
Fixed in Tornado 6.6. Tornado now yields to the event loop periodically while reading any body, combines small chunks before passing them to data_received, and stores non-streaming bodies more compactly.
Applications using @stream_request_body should note that the pieces passed to data_received no longer correspond to HTTP chunk boundaries.
Workarounds
- Run Tornado behind a reverse proxy that buffers request bodies and forwards them with a
Content-Lengthheader instead of chunked encoding. - Lower
max_body_size(for the whole server or for individual handlers) to limit the impact of each request.
Credit
Reported by uttej-badwane.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | tornado | < 6.6 | 6.6 |
Referencias
- https://github.com/tornadoweb/tornado/security/advisories/GHSA-r4j5-9xpp-3985
- https://nvd.nist.gov/vuln/detail/CVE-2026-115927
- https://github.com/tornadoweb/tornado/pull/3773
- https://github.com/tornadoweb/tornado/commit/ceab33581489751a66fba8566ad6d5960d4b01c8
- https://github.com/tornadoweb/tornado
- https://github.com/tornadoweb/tornado/releases/tag/v6.6.0
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L- Debilidad (CWE)
CWE-400, CWE-770- Plataforma
- Python (PyPI)
- Paquete
tornado- Publicada
- 28.10.2026
- Actualizado
- 29.10.2026 01:17
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-r4j5-9xpp-3985 - CC BY 4.0
Historial de vulnerabilidades: tornado
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 27
- Primera → última
- 05.2012 11.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 13
- Media 10
- Baja 4
Divulgaciones por año
- 2017: 0
- 2018: 0
- 2019: 0
- 2020: 1
- 2021: 0
- 2022: 0
- 2023: 2
- 2024: 3
- 2025: 4
- 2026: 16
antes: 1
-
Tornado: Event loop blocking and excess memory use from chunked bodies with many small chunks esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.