Oct 1, 2026·6 min read·18 visits
A design asymmetry in Tornado's query-string parser allows unbounded key-value field processing on GET requests, allowing remote attackers to starve CPU resources and block the event loop, causing a denial of service.
An uncontrolled resource consumption vulnerability in Tornado's HTTP query-string parser allows remote, unauthenticated attackers to trigger CPU exhaustion and block the single-threaded event loop via crafted request URIs containing large numbers of parameters.
The Tornado web server is an asynchronous networking library and web framework built to run on a single-threaded event loop known as the IOLoop. In an event-loop-driven system, synchronous, CPU-bound tasks block the execution of all other concurrent connections. If any system component executes an expensive synchronous operation, the entire application freezes for the duration of that task.
To mitigate CPU-exhaustion vectors, the Tornado framework introduced restrictions on incoming payloads. In version 6.5.8, a restriction was added to limit the number of fields in URL-encoded POST bodies to 1,000 fields using the max_num_fields parameter. This effectively protected the application against body-based multi-field exploitation.
However, the HTTP GET query-string parsing logic was not restricted. Because query strings bypass the POST-body parser and funnel directly to the initial request initialization parser, this path remained entirely unbounded. Unauthenticated remote attackers can leverage this unconstrained execution path to send requests with thousands of query-string parameters.
The core of the vulnerability lies in the asymmetrical implementation of input validation between the POST body parser and the query-string parser inside tornado/httputil.py. While the POST path calls parse_body_arguments with an explicit max_num_fields argument, the GET path initializes arguments within HTTPServerRequest.__init__ using an unconstrained call.
Under the hood, Tornado maps query-string parsing to tornado.escape.parse_qs_bytes, which wraps Python's standard library utility urllib.parse.parse_qsl. Python's standard parser is highly CPU-intensive when handling a massive quantity of fields. The parsing algorithm involves repetitive dictionary lookups, string splitting, and URL-decoding logic that exhibits superlinear execution costs as parameter counts rise.
Although Tornado enforces a global default header limit of 64KB (max_header_size), an attacker can craft highly dense payloads containing thousands of minimal keys. A 64KB payload can pack up to approximately 12,700 individual key-value pairs. This volume is more than sufficient to introduce blocking latency on the single-threaded event loop, which cannot process new events while parsing the query.
A direct comparison of the vulnerable and patched file tornado/httputil.py reveals the exact mechanism of the fix. In the unpatched version, the request constructor processes the incoming query string without passing any boundary limits.
# Vulnerable implementation in Tornado < 6.5.9
if uri is not None:
self.path, sep, self.query = uri.partition("?")
self.arguments = parse_qs_bytes(self.query, keep_blank_values=True)The patched version integrates boundary defense by pulling the global limit from _DEFAULT_PARSE_BODY_CONFIG and wrapping the initialization in a try-except block to gracefully handle exceptions as HTTP 400 errors.
# Patched implementation in Tornado 6.5.9
if uri is not None:
self.path, sep, self.query = uri.partition("?")
try:
self.arguments = parse_qs_bytes(
self.query,
keep_blank_values=True,
# The query string is bounded by max_header_size, but parsing
# is expensive enough per field to be worth limiting. Use the
# same limit as a urlencoded body. This reads the global
# config because HTTPServerRequest has no access to the
# per-connection configuration; see set_parse_body_config.
max_num_fields=_DEFAULT_PARSE_BODY_CONFIG.urlencoded.max_arguments,
)
except Exception as e:
raise HTTPInputError("Invalid query string: %s" % e) from eWhile this patch is highly effective for standard deployments, certain limitations exist. If downstream developers manually access the raw self.request.query and pass it to unconstrained third-party parsers, they remain vulnerable to CPU exhaustion. Additionally, because the query string parser lacks direct access to the per-connection configuration, it relies entirely on the global config default, meaning administrators cannot configure customized query-string limits per handler.
To execute this denial of service attack, an unauthenticated remote attacker identifies a public interface exposing a standard handler. The attacker then structures a request line with an extremely high concentration of parameters, such as GET /?k0=1&k1=1&k2=1... up to thousands of parameters.
Empirical verification conducted against an unpatched instance shows that standard baseline probes to /?a=1 require approximately 1.86ms of processing latency. When a payload of 7,800 parameters (~61KB) is sent to the server, the parsing processing latency rises to an average of 25.1ms, which represents an increase of over 13 times the baseline duration.
When multiple concurrent requests are initiated, the compounding latency starves the IOLoop completely. In dynamic testing, sending five concurrent exploit requests caused legitimate baseline requests to face an average latency of 13.0ms, with peak latency reaching 118.1ms. If the default max_header_size is increased from 64KB, the execution time scales exponentially, allowing a single request to lock the CPU for several seconds.
The security impact of GHSA-3HV7-MJH2-FV65 is classified as a low-to-medium availability threat with a CVSS score of 5.3. The attack can be executed remotely without privileges, bypasses internal authentication layers, and does not require user interaction.
Although the flaw does not lead to remote code execution, information leakage, or memory corruption, its impact on application availability is immediate. Because Tornado is single-threaded, a steady, low-bandwidth stream of high-density requests can degrade performance to a state where standard connections timeout.
Organizations running latency-critical web services, real-time message brokers, or WebSockets on unpatched Tornado versions are vulnerable. Under sustained exploitation, upstream reverse proxies and load balancers may mark the unresponsive Tornado upstream nodes as unhealthy, resulting in complete service dropouts.
The primary recommendation is to update the Tornado framework package to version 6.5.9 or higher. This update restricts query strings to 1,000 arguments and rejects oversized payloads with a 400 Bad Request error.
If upgrading immediately is not an option, you can implement reverse proxy mitigations to shield the upstream server. For instance, in an Nginx deployment, keep the large_client_header_buffers directive strict, or add configuration to reject queries exceeding a specific length:
if ($query_string ~ "^.{8192,}") {
return 414;
}Additionally, developers can programmatically limit the maximum permissible header size in the Tornado HTTP server instantiation block, which minimizes the capacity of the vector:
# Restrict maximum header size to 16KB to reduce parameters payload density
http_server = tornado.httpserver.HTTPServer(app, max_header_size=16384)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
tornado Tornado | < 6.5.9 | 6.5.9 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-400 (Uncontrolled Resource Consumption) / CWE-407 (Algorithmic Complexity) |
| Attack Vector | Network (Unauthenticated) |
| CVSS v3.1 Score | 5.3 (Medium) |
| EPSS Score | Not Applicable (requires CVE ID) |
| Exploit Status | PoC (Proof-of-Concept) |
| CISA KEV Status | Not Applicable |
| Impact | Denial of Service (DoS) |
The system does not adequately limit the allocation of CPU resources when processing multi-field query-string inputs.
CVE-2026-128087 (GHSA-9264-jvgf-6w2f) is an incorrect behavior order (CWE-696) and improper authorization (CWE-863) vulnerability in the russh Rust SSH library, affecting versions 0.55.0 through 0.65.0. During the initial SSH key exchange (KEX) handshake, the client state machine invokes the client::Handler::kex_done() callback—providing the negotiated raw shared secret bytes—prior to validating the remote server's host key or certificate via check_server_key(). Consequently, an untrusted or rogue SSH server can complete cryptographic key agreement and force a connecting client to execute side-effecting application logic inside kex_done() before the server's identity is checked and rejected.
CVE-2026-128082 (GHSA-6vhm-j9h7-f9gh) is an uncontrolled recursion vulnerability (CWE-674) in AutoMapper, a convention-based object-object mapper for .NET. When mapping nested or self-referential types into destination models that rely on parameterized constructors, C# positional records, or recursive ConstructUsing expressions, AutoMapper evaluates child constructor arguments prior to incrementing the parent's recursion depth counter. This ordering flaw bypasses both explicit MaxDepth limits and the default depth limit of 64. An unauthenticated remote attacker can supply deeply nested input payloads to affected endpoints, exhausting the thread call stack and triggering an uncatchable System.StackOverflowException that terminates the hosting .NET process.
An information exposure vulnerability in the @opentelemetry/instrumentation-http package for OpenTelemetry JavaScript versions 0.204.0 prior to 0.222.0 causes incoming HTTP server spans to record raw, unredacted query string parameters under the url.query attribute. While outgoing client spans applied built-in and user-configured query parameter redaction, incoming server spans bypassed this sanitization completely, resulting in the transmission of sensitive credentials such as pre-signed cloud URLs and API tokens to external observability backends.
CVE-2026-128089 is an uncontrolled resource consumption vulnerability in the dnspython toolkit for Python, affecting all versions prior to 2.9.2. When parsing Well-Known Service (WKS) records from text via dns.rdtypes.IN.WKS.WKS.from_text(), the parser fails to validate that numeric service port identifiers fall within the RFC 1035 valid range of 0 through 65535. An attacker capable of supplying untrusted zone files or RDATA text strings containing an arbitrarily large service port integer can force the parser to allocate an unbounded bitmap array using an inefficient linear append loop, resulting in severe CPU exhaustion, application hangs, or Out-Of-Memory (OOM) process termination.
CVE-2026-126347 (GHSA-5cjw-f85j-cv6r) is an open redirect vulnerability (CWE-601) in Tornado, an asynchronous Python networking library and web framework. The flaw resides in tornado.web.RedirectHandler when dynamic URL redirection templates incorporate unvalidated user input. Due to a parser differential between RFC 3986 (used by Python's urllib.parse.urlsplit) and the WHATWG URL Standard (used by modern web browsers), inputs containing three or more leading slashes bypass Tornado 6.6.0's validation logic, allowing unauthenticated attackers to redirect users to arbitrary external domains.
A Denial of Service (DoS) vulnerability exists in @sveltejs/adapter-node versions 5.5.7 and 6.0.0-next.0 through 6.0.0. When a SvelteKit server route returns a direct response from a fetch() call with a Content-Type of text/event-stream, the Node.js adapter attempts to mutate the response headers to disable proxy buffering. Because headers returned directly by the WHATWG Fetch API carry an immutable guard, this mutation throws an unhandled TypeError, terminating the underlying Node.js process and denying service to all active and subsequent clients.