CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-67726

CVE-2025-67726: Denial of Service via Quadratic Parameter Parsing in Tornado httputil

Alon Barad
Alon Barad
Software Engineer

Jul 20, 2026·6 min read·19 visits

Executive Summary (TL;DR)

Tornado web framework versions before 6.5.3 use an inefficient algorithm to parse header values, allowing unauthenticated remote attackers to cause a complete Denial of Service via CPU exhaustion with a single crafted request.

A denial of service vulnerability in Tornado versions 6.5.2 and below arises from excessive iteration in its parameter parser. The `_parseparam` function in `httputil.py` parses parameters in HTTP headers using an inefficient nested loop that counts double quotes from index zero. This implementation exposes a quadratic $O(n^2)$ complexity curve when processing quoted headers containing a high volume of semicolons, leading to CPU exhaustion and blocking the asynchronous event loop.

Vulnerability Overview

Tornado is an asynchronous Python web framework and networking library designed to handle thousands of simultaneous connections. The framework processes incoming HTTP requests, extracting metadata from headers such as Content-Disposition and Content-Type. During parameter parsing, Tornado uses an internal utility function called _parseparam within tornado/httputil.py. This function identifies and separates parameter key-value pairs separated by semicolons.

Because the parsing occurs on the synchronous side of the connection handler, any delay during header ingestion blocks the execution flow. The vulnerability described as CVE-2025-67726 represents an uncontrolled resource consumption issue (CWE-400) originating from excessive iteration (CWE-834). An attacker can supply a payload that forces the parser into a nested loop with quadratic complexity, causing the single-threaded event loop to freeze.

Root Cause Analysis

The vulnerability is located in the _parseparam function in tornado/httputil.py. When a multipart header contains parameters, they are separated by semicolons. Semicolons inside quoted strings (e.g., name="val;ue") must be ignored and not treated as parameter delimiters. To handle this, the parser searches for the next semicolon and checks if it falls inside an active quote context.

The parser calculates whether a quote is open by counting the total number of quotes and escaped quotes from the start of the string up to the found semicolon using s.count('"', 0, end) - s.count('\\"', 0, end). If this count is odd, the quote is open, and the parser advances to search for the next semicolon. When a single quoted parameter contains thousands of semicolons, the parser loops over each one, repeatedly counting quotes starting from index 0 up to the current semicolon index end.

This implementation results in quadratic time complexity $O(n^2)$ relative to the number of semicolons. As the number of semicolons increases, the parser takes exponentially longer to process the header. Furthermore, the parser repeatedly performs string slicing operations (s = s[end:]), which adds significant memory allocation and string-copying overhead to the CPU-bound operation.

Code Analysis

The vulnerable code path from versions 6.5.2 and below demonstrates the recursive string slicing and full-prefix quote scanning:

# Vulnerable implementation in tornado/httputil.py (<= 6.5.2)
def _parseparam(s: str) -> Generator[str, None, None]:
    while s[:1] == ";":
        s = s[1:]
        end = s.find(";")
        # Scanning the entire prefix (0 to end) on each iteration
        while end > 0 and (s.count('"', 0, end) - s.count('\\"', 0, end)) % 2:
            end = s.find(";", end + 1)
        if end < 0:
            end = len(s)
        f = s[:end]
        yield f.strip()
        s = s[end:]

The fix introduced in version 6.5.3 replaces string slicing with index pointers and optimizes the quote counting to use a sliding window, converting the algorithm to linear time complexity $O(n)$:

# Patched implementation in tornado/httputil.py (6.5.3)
def _parseparam(s: str) -> Generator[str, None, None]:
    start = 0
    while s.find(";", start) == start:
        start += 1
        end = s.find(";", start)
        ind, diff = start, 0
        while end > 0:
            # Sliding window count: only count quotes between ind and end
            diff += s.count('"', ind, end) - s.count('\\"', ind, end)
            if diff % 2 == 0:
                break
            # Typo: end and ind are updated, but note the order
            end, ind = ind, s.find(";", end + 1)
        if end < 0:
            end = len(s)
        f = s[start:end]
        yield f.strip()
        start = end

Although the patch contains a logical permutation typo in end, ind = ind, s.find(";", end + 1), the performance remains robust and linear. Because Python's s.count is optimized in C, avoiding repeated scanning from index 0 successfully eliminates the quadratic complexity curve.

Exploitation

Exploitation of CVE-2025-67726 requires only network access to an endpoint that accepts multipart form uploads or parses user-supplied headers. An attacker can construct a payload where a header, such as Content-Disposition, includes a parameter with a long quoted string populated entirely with semicolons. The structure of the malicious request conforms to standard multipart forms, ensuring it bypasses basic structure validation filters.

When the Tornado server reads the multipart payload, it invokes parse_multipart_form_data which in turn calls _parseparam. The event loop blocks synchronously. Because Tornado's execution model is single-threaded and relies on a non-blocking event loop, blocking the main thread for even a few seconds halts all concurrent requests. An attacker sending multiple requests of this type can keep a multi-core server permanently unresponsive.

Impact Assessment

The impact of this vulnerability is assessed as high (CVSS 7.5). Because Tornado is frequently used to build high-performance APIs and WebSocket endpoints, a complete lockup of the single-threaded event loop results in immediate application failure. Connection pools are exhausted, existing client connections time out, and health-checks fail, prompting automated orchestrators like Kubernetes to restart the container.

There is no confidentiality or integrity impact associated with this flaw, as it does not allow memory corruption or remote code execution. However, the low barrier to entry and the minimal network resources required to execute the attack make it highly effective. A single client connection using negligible bandwidth can incapacitate a service running on substantial infrastructure.

Remediation and Patch Analysis

The primary and recommended solution is upgrading the Tornado framework to version 6.5.3 or later. This release incorporates the index-based parsing method that prevents quadratic processing time. If updating the package is not immediately viable, temporary web application firewall (WAF) rules or reverse proxy limits should be deployed.

WAFs should be configured to limit the maximum length of individual HTTP headers to a reasonable limit (e.g., 1024 characters) and inspect headers for abnormally high densities of delimiters. For example, Nginx can be configured to drop requests with excessively large header buffer sizes. Developers can also implement intermediate middleware to strip or inspect headers before they reach Tornado's default parser core.

Official Patches

Tornado GitHubOfficial Tornado Security Advisory

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS Probability
0.38%
Top 70% most exploited

Affected Systems

tornadoweb/tornado

Affected Versions Detail

Product
Affected Versions
Fixed Version
Tornado
Tornado
< 6.5.36.5.3
AttributeDetail
CWE IDCWE-834 / CWE-400
Attack VectorNetwork (AV:N)
CVSS v3.1 Score7.5 (High)
EPSS Score0.00378
Exploit StatusProof of Concept
ImpactDenial of Service (DoS)
RemediationUpgrade to Tornado v6.5.3

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-834
Excessive Iteration

The application consumes excessive CPU resources by looping an uncontrolled or poorly managed number of times.

References & Sources

  • [1]GHSA-jhmp-mqwm-3gq8
  • [2]Tornado Fix Commit 771472c
  • [3]Tornado v6.5.3 Release Notes
  • [4]Upstream CPython Pull Request 136072

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 11 hours ago•CVE-2026-9318
5.4

CVE-2026-9318: Stored Cross-Site Scripting via HTML Export in Jazzband tablib

CVE-2026-9318 is a stored cross-site scripting (XSS) vulnerability affecting Jazzband tablib versions prior to 3.10.0. The flaw is located in the HTML export functionality of multi-sheet Databook objects. Due to raw f-string interpolation, unsanitized sheet titles containing malicious script tags are rendered directly as HTML, allowing arbitrary client-side code execution in a victim's browser.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 12 hours ago•CVE-2026-54917
10.0

CVE-2026-54917: Cross-Bucket Path Traversal and Authorization Bypass in SeaweedFS S3 and Iceberg Gateways

CVE-2026-54917 is a critical path traversal and authorization bypass vulnerability affecting the S3 and Iceberg REST catalog gateways in SeaweedFS. By explicitly disabling canonical path cleaning in the gorilla/mux routing system, relative path segments such as '..' are allowed to bypass routing constraints and access control checks. When these paths are collapsed server-side by the backend filer, they resolve to folders outside the authorized bucket boundary, allowing unauthorized cross-bucket access.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 13 hours ago•GHSA-JWJP-4649-V8JP
7.5

GHSA-jwjp-4649-v8jp: Out-of-Bounds Read in SIPSorcery SCTP SACK Chunk Parsing

An out-of-bounds read vulnerability in the SCTP SACK chunk parser of SIPSorcery leads to Denial of Service (DoS) or silent internal state corruption due to lack of boundary validation on incoming chunk elements.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 14 hours ago•GHSA-PFVM-W89X-94JW
7.5

GHSA-pfvm-w89x-94jw: Uncaught Exception in STUN Parser Causes Complete TurnServer Receive Loop Termination

An uncaught exception vulnerability exists in SIPSorcery's TurnServer component, where unauthenticated malformed UDP packets can crash the core UDP receive loop, resulting in a persistent Denial of Service.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•CVE-2026-62898
7.5

CVE-2026-62898: Use After Free Information Disclosure in Microsoft QUIC

A critical use-after-free vulnerability in Microsoft QUIC allows unauthenticated remote attackers to disclose sensitive system memory over the network. The vulnerability is caused by a race condition during rapid connection termination and asynchronous packet retransmission.

Alon Barad
Alon Barad
13 views•6 min read
•1 day ago•CVE-2026-62899
5.9

CVE-2026-62899: .NET Security Feature Bypass Vulnerability (HTTP Request Smuggling)

CVE-2026-62899 is a security feature bypass vulnerability in the Microsoft .NET runtime environment on non-Windows platforms. The flaw manifests as an HTTP Request/Response Smuggling vulnerability (CWE-444) within the managed implementation of the System.Net.HttpListener class. This allows unauthenticated remote attackers to desynchronize request boundaries when the backend .NET application is hosted behind an upstream reverse proxy.

Amit Schendel
Amit Schendel
16 views•6 min read