Tornado: Quadratic CPU usage when parsing HTTP headers with line folding
Summary
Tornado's HTTP header parser takes quadratic time (O(n²)) when a header value is continued across many "obsolete line folding" (obs-fold) lines. An unauthenticated attacker can send a request whose header block is mostly short continuation lines. Parsing it uses a large amount of CPU on the IOLoop thread and blocks every other connection that process is serving.
This issue is closely related to CVE-2025-67725 (GHSA-c98p-7wgm-6p64). The fix for that advisory covered repeated headers but not line-folded continuations.
Impact
All Tornado HTTP servers are affected. Header parsing runs before any application code, so no authentication or particular handler is required.
How bad it gets depends on max_header_size:
- Default (64 KB): each malicious request blocks the event loop for tens of milliseconds. Repeated requests can degrade service.
- Raised
max_header_size: the cost grows with the square of the header size. A single 1 MB request can block the process for several seconds.
Only availability is affected. Confidentiality and integrity are not.
Patches
Fixed in Tornado 6.6 by removing support for obsolete line folding completely; header lines that begin with whitespace are now rejected.
Workarounds
- Keep
max_header_sizeat its default value or lower it. This limits the impact but doesn't remove it. - Run Tornado behind a reverse proxy that rejects or normalizes obsolete line folding before forwarding requests.
Credit
Reported by @manus-pi.
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-pcg2-g6cj-q92c
- https://nvd.nist.gov/vuln/detail/CVE-2026-116577
- https://github.com/tornadoweb/tornado/pull/3765
- https://github.com/tornadoweb/tornado/commit/1b7a1dc9f340f52de929852e8125aa12f25297c9
- 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-407, 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-pcg2-g6cj-q92c - 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: Quadratic CPU usage when parsing HTTP headers with line folding 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.