VAITP Dataset

← Back to the dataset

CVE-2026-115927

DoS: event-loop stall by sending millions of 1‑byte chunks (Tornado <6.6.0)

  • CVSS 5.3
  • CWE-400
  • Resource Management
  • Remote

Tornado is a Python web framework and asynchronous networking library. Prior to 6.6.0, Tornado decodes HTTP/1.1 chunked transfer encoding by processing body data that has already arrived without yielding to the event loop. A remote unauthenticated peer can send millions of one-byte chunks to monopolize the process event loop and stall every other connection served by that process, while lowering max_body_size only limits the duration of each request. For handlers that do not use @stream_request_body, retaining each chunk as a separate object can consume roughly twenty times the received body size, and SimpleAsyncHTTPClient has the same event-loop behavior when reading a response from a malicious server. This issue is fixed in version 6.6.0.

CVSS base score
5.3
Published
2026-10-26
OWASP
A04 Insecure Design
Orthogonal defect classification
Timing/Serialization
Code defect classification
Timing Issues
Category
Resource Management
Subcategory
Resource Exhaustion
Accessibility scope
Remote
Impact
Denial of Service (DoS)
Affected component
Tornado
Fixed by upgrading
Yes

Solution

Upgrade Tornado to version 6.6.0 or later.

Vulnerable code sample

import tornado.web
import tornado.ioloop

class EchoHandler(tornado.web.RequestHandler):
    async def post(self):
        # VULNERABLE: processes all received chunks at once, blocking the event loop
        data = self.request.body
        self.set_status(200)
        self.write(data)

def make_app():
    return tornado.web.Application([
        (r"/echo", EchoHandler),
    ])

def start():
    app = make_app()
    app.listen(8888)
    tornado.ioloop.IOLoop.current().start()

Patched code sample

import tornado.web
import tornado.ioloop

class EchoHandler(tornado.web.RequestHandler):
    def initialize(self):
        self._chunks = []

    @tornado.web.stream_request_body
    def data_received(self, chunk):
        # FIX: stream chunks asynchronously to avoid blocking the event loop
        self._chunks.append(chunk)

    async def post(self):
        data = b"".join(self._chunks)
        self.set_status(200)
        self.write(data)

def make_app():
    return tornado.web.Application([
        (r"/echo", EchoHandler),
    ])

def start():
    app = make_app()
    app.listen(8888)
    tornado.ioloop.IOLoop.current().start()

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • http1connection: Avoid event loop starvation from chunked bodies (tornadoweb/tornado)
    tornado/http1connection.py, tornado/http1connection.py · HTTP1Connection._read_body_until_close, tornado/http1connection.py · HTTP1Connection._read_chunked_body, tornado/http1connection.py · HTTP1Connection._read_fixed_body, tornado/httpserver.py · _CallableAdapter.data_received, tornado/httpserver.py · _CallableAdapter.finish, tornado/httpserver.py · _CallableAdapter.__init__, tornado/simple_httpclient.py · _HTTPConnection.data_received, tornado/simple_httpclient.py · _HTTPConnection.finish, tornado/simple_httpclient.py · _HTTPConnection.__init__, tornado/web.py · _HandlerDelegate.data_received, tornado/web.py · _HandlerDelegate.finish and 1 more

Cite this entry

@misc{vaitp:cve2026115927,
  title        = {{DoS: event-loop stall by sending millions of 1‑byte chunks (Tornado <6.6.0)}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-115927},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-115927/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.