# CVE-2024-52804: Tornado has HTTP cookie parsing DoS vulnerability

> Attackers can cause excessive CPU consumption and block request processing by sending maliciously crafted HTTP cookie headers to applications using the Tornado library.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Nov 2024
- **Updated:** 3 Nov 2025
- **Also known as:** ALSA-2024:10590, ALSA-2025:2872, AZL-53522, AZL-53624, BELL-CVE-2024-52804, CLEANSTART-2026-SW42898, CLSA-2026-1774830272, DEBIAN-CVE-2024-52804, ECHO-d90e-6b66-657c, GHSA-8w49-h785-mj3c, MGASA-2025-0060, OESA-2024-2509, PYSEC-2026-1975, RHSA-2025:2550, RHSA-2025:2872, RHSA-2025:2955, RHSA-2025:2956, RHSA-2025:3109, RLSA-2024:10590, RLSA-2025:2471, RLSA-2025:2872, ROOT-APP-PYPI-CVE-2024-52804, SUSE-SU-2024:4137-1, SUSE-SU-2025:20096-1, UBUNTU-CVE-2024-52804, openSUSE-SU-2024:14528-1

## What is CVE-2024-52804?

CVE-2024-52804 is a high-severity denial of service vulnerability in tornadoweb tornado, published on 22 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Tornado is a Python web framework and asynchronous networking library. 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. Version 6.4.2 fixes the issue.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2024-52804?

3 open source packages ship an affected version, including tornado. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tornado` | PyPI | All versions | 6.4.2 |
| `tornado` | PyPI | All versions | 6.4.2 |
| `tornado` | PyPI | All versions | 6.4.2 |
| `pcs` | AlmaLinux:8 | All versions | 0.10.18-2.el8_10.4.alma.1 |
| `pcs-snmp` | AlmaLinux:8 | All versions | 0.10.18-2.el8_10.4.alma.1 |
| `python3-tornado` | AlmaLinux:9 | All versions | 6.4.2-1.el9_5 |
| `pcs` | Red Hat:enterprise_linux:8::highavailability | All versions | 0:0.10.18-2.el8_10.4 |
| `pcs-snmp` | Red Hat:enterprise_linux:8::highavailability | All versions | 0:0.10.18-2.el8_10.4 |
| `pcs` | Red Hat:enterprise_linux:8::resilientstorage | All versions | 0:0.10.18-2.el8_10.4 |
| `pcs-snmp` | Red Hat:enterprise_linux:8::resilientstorage | All versions | 0:0.10.18-2.el8_10.4 |
| `pcs` | Red Hat:rhel_aus:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.6 |
| `pcs-snmp` | Red Hat:rhel_aus:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.6 |
| `pcs` | Red Hat:rhel_e4s:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.6 |
| `pcs-snmp` | Red Hat:rhel_e4s:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.6 |
| `pcs` | Red Hat:rhel_e4s:8.6::highavailability | All versions | 0:0.10.12-6.el8_6.7 |
| `pcs-snmp` | Red Hat:rhel_e4s:8.6::highavailability | All versions | 0:0.10.12-6.el8_6.7 |
| `pcs` | Red Hat:rhel_e4s:9.0::highavailability | All versions | 0:0.11.1-10.el9_0.7 |
| `pcs-snmp` | Red Hat:rhel_e4s:9.0::highavailability | All versions | 0:0.11.1-10.el9_0.7 |
| `pcs` | Red Hat:rhel_e4s:9.0::resilientstorage | All versions | 0:0.11.1-10.el9_0.7 |
| `pcs-snmp` | Red Hat:rhel_e4s:9.0::resilientstorage | All versions | 0:0.11.1-10.el9_0.7 |
| `pcs` | Red Hat:rhel_eus:8.8::highavailability | All versions | 0:0.10.15-4.el8_8.4 |
| `pcs-snmp` | Red Hat:rhel_eus:8.8::highavailability | All versions | 0:0.10.15-4.el8_8.4 |
| `pcs` | Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:0.10.15-4.el8_8.4 |
| `pcs-snmp` | Red Hat:rhel_eus:8.8::resilientstorage | All versions | 0:0.10.15-4.el8_8.4 |
| `pcs` | Red Hat:rhel_tus:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.6 |
| `pcs-snmp` | Red Hat:rhel_tus:8.4::highavailability | All versions | 0:0.10.8-1.el8_4.6 |
| `pcs` | Red Hat:rhel_tus:8.6::highavailability | All versions | 0:0.10.12-6.el8_6.7 |
| `pcs-snmp` | Red Hat:rhel_tus:8.6::highavailability | All versions | 0:0.10.12-6.el8_6.7 |
| `pcs` | Rocky Linux:8 | All versions | 0:0.10.18-2.el8_10.4 |
| `pcs` | Rocky Linux:9 | All versions | 0:0.11.8-1.el9_5.2 |
| `python-tornado` | Rocky Linux:9 | All versions | 0:6.4.2-1.el9_5 |
| `python-tornado6` | SUSE:Linux Enterprise Module for Python 3 15 SP5 | All versions | 6.3.2-150400.9.6.1 |
| `python-tornado6` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 6.3.2-150400.9.6.1 |
| `python-tornado6` | SUSE:Linux Micro 6.0 | All versions | 6.4-2.1 |
| `python-tornado6` | openSUSE:Leap 15.5 | All versions | 6.3.2-150400.9.6.1 |
| `python-tornado6` | openSUSE:Leap 15.6 | All versions | 6.3.2-150400.9.6.1 |
| `python-tornado6` | openSUSE:Tumbleweed | All versions | 6.4.2-1.1 |

Products: Tornadoweb Tornado.

## How do I fix CVE-2024-52804?

Upgrade tornado to 6.4.2 or later.

## Is CVE-2024-52804 being exploited?

There is no known exploitation of CVE-2024-52804 in the wild and no public exploit code.

## Other vulnerabilities in tornadoweb tornado

- [CVE-2026-31958](https://insights.sbomify.com/CVE-2026-31958/): Tornado has a DoS due to too many multipart parts (high 8.7)
- [CVE-2025-67725](https://insights.sbomify.com/CVE-2025-67725/): Tornado is Vulnerable to Quadratic DoS via Repeated Header Coalescing (high 7.5)
- [CVE-2025-67726](https://insights.sbomify.com/CVE-2025-67726/): Tornado is Vulnerable to Quadratic DoS via Crafted Multipart Parameters (high 7.5)
- [CVE-2026-35536](https://insights.sbomify.com/CVE-2026-35536/): Tornado has incomplete validation of cookie attributes (high 7.2)
- [CVE-2014-9720](https://insights.sbomify.com/CVE-2014-9720/): Tornado XSRF cookie allows side-channel attack against TLS (BREACH attack) (medium 6.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-52804 and fix it if it is affected.

What it is: CVE-2024-52804 is a high-severity denial of service vulnerability in tornadoweb tornado, published on 22 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-52804 in the wild and no public exploit code.

Affected packages and fixed versions:
- tornado (PyPI): affected all versions; fixed in 6.4.2
- tornado (PyPI): affected all versions; fixed in 6.4.2
- tornado (PyPI): affected all versions; fixed in 6.4.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-52804/ (Markdown: https://insights.sbomify.com/CVE-2024-52804/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-52804
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-52804
- OSV: https://osv.dev/vulnerability/CVE-2024-52804

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-52804/
Summaries are generated and may contain mistakes; the official description above is the record.
