GHSA-r4j5-9xpp-3985: Medium severity pip/tornado vulnerability

Published Oct 28, 2026
·
Updated

Summary

When Tornado reads an HTTP/1.1 body that uses chunked transfer encoding, it processes all chunks that have already arrived without yielding to the event loop. A client can send a body made of millions of 1-byte chunks, which blocks the event loop (and therefore every other connection served by that process) for the entire time it takes to parse the body. A body near the default maxbodysize of 100 MB can block the process for close to a minute, and the attacker can repeat or parallelize these requests.

Bodies made of tiny chunks also consumed far more memory than their size: a handler that does not use @streamrequestbody stored each chunk as a separate object, using roughly 20 times as much memory as the bytes received.

Impact

All Tornado HTTP servers are affected when they receive a request body for a handler that reads it, which includes any handler that does not reject the request before the body is read. No authentication is required. Lowering maxbodysize reduces the maximum blocking time and memory use for each request but does not remove the issue.

SimpleAsyncHTTPClient is affected in the same way when it reads a response from a malicious server.

Patches

Fixed in Tornado 6.6. Tornado now yields to the event loop periodically while reading any body, combines small chunks before passing them to datareceived, and stores non-streaming bodies more compactly.

Applications using @streamrequestbody should note that the pieces passed to datareceived no longer correspond to HTTP chunk boundaries.

Workarounds

- Run Tornado behind a reverse proxy that buffers request bodies and forwards them with a Content-Length header instead of chunked encoding. - Lower maxbodysize (for the whole server or for individual handlers) to limit the impact of each request.

Credit

Reported by uttej-badwane.

Affected Software

1 affected componentFixes available
pip/tornado<6.6
6.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/tornado to a version that resolves this vulnerability.

    Fixed in 6.6
  2. Upgrade

    Upgrade Tornado to a version that resolves this vulnerability.

    Fixed in 6.6
  3. Configuration

    Lower max_body_size for the whole server or individual handlers to reduce the maximum blocking time and memory use of each request.

    Tornado HTTP server max_body_size = lower than the default 100 MB
  4. Compensating control

    Run Tornado behind a reverse proxy that buffers request bodies and forwards them with a Content-Length header instead of chunked encoding.

Event History

Oct 28, 2026
Advisory Published
via GitHub·10:43 PM
Data Sourced
via GitHub·10:43 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed?

All Tornado HTTP servers are affected when they receive a request body for a handler that reads it, including handlers that do not reject the request before the body is read. SimpleAsyncHTTPClient is also affected when reading a response from a malicious server.

2

What must an attacker do to trigger the issue?

An unauthenticated client can send an HTTP/1.1 chunked request body composed of very large numbers of 1-byte chunks. A malicious server can similarly send such a chunked response to a SimpleAsyncHTTPClient client.

3

Are default settings sufficient to limit the impact?

No. A body near the default 100 MB max_body_size can block the process for close to a minute, and handlers that do not use @stream_request_body can consume roughly 20 times the received body size in memory when chunks are tiny.

4

What mitigation is available if patching cannot happen immediately?

Lowering max_body_size reduces the maximum blocking time and memory use of each request. It does not eliminate the issue, and requests can still be repeated or parallelized.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203