CVE-2024-52804: Tornado has an HTTP cookie parsing DoS vulnerability
The algorithm used for parsing HTTP cookies in Tornado versions prior to 6.4.2 sometimes has quadratic complexity, leading to excessive CPU consumption when parsing maliciously-crafted cookie headers. This parsing occurs in the event loop thread and may block the processing of other requests. See also CVE-2024-7592 for a similar vulnerability in cpython.
Published Nov 22, 2024 · Updated Nov 4, 2025
Affected packages
tornado
- Ecosystem
- PyPI
- Affected
- <= 6.4.1
- Fixed in
- 6.4.2
- Check
pip show tornado
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
The algorithm used for parsing HTTP cookies in Tornado versions prior to 6.4.2 sometimes has quadratic complexity, leading to excessive CPU consumption when parsing maliciously-crafted cookie headers. This parsing occurs in the event loop thread and may block the processing of other requests.
See also CVE-2024-7592 for a similar vulnerability in cpython.
Credited to kexinoh.
References
- https://github.com/tornadoweb/tornado/security/advisories/GHSA-8w49-h785-mj3c
- https://nvd.nist.gov/vuln/detail/CVE-2024-52804
- https://github.com/tornadoweb/tornado/commit/d5ba4a1695fbf7c6a3e54313262639b198291533
- https://lists.debian.org/debian-lts-announce/2025/01/msg00000.html
- https://github.com/advisories/GHSA-8w49-h785-mj3c
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-126347
Tornado: Open redirect via triple-slash redirect paths
low3.1Nov 13, 2026CVE-2026-115927
Tornado: Event loop blocking and excess memory use from chunked bodies with many small chunks
medium5.3Oct 28, 2026CVE-2026-116577
Tornado: Quadratic CPU usage when parsing HTTP headers with line folding
medium5.3Oct 28, 2026CVE-2026-116578
Tornado: Open redirect in RedirectHandler via protocol-relative URLs
low2.1Oct 28, 2026GHSA-3hv7-mjh2-fv65
Tornado: Unbounded query-string argument count allows event-loop-stalling DoS
medium5.3Sep 30, 2026GHSA-c2m8-h5v5-343r
Tornado: StaticFileHandler follows symlinks outside static root (path traversal)
high8.2Sep 30, 2026
