Advisory

PYSEC-2026-3389

Also known as: CVE-2026-49855, GHSA-mgf9-4vpg-hj56

Summary

tornado AsyncHTTPClient accumulates decompressed chunks without size limit (gzip bomb)

Details

Tornado's gzip decompression routines work in limited-size chunks, but have no overall limit for the total size of decompressed chunks that they will accumulate (There has always been a limit for the total *compressed* size). This allows a malicious server to consume effectively unlimited amounts of memory if it is accessed via SimpleAsyncHTTPClient in its default configuration. HTTPServer is not affected in its default configuration, but it is if decompress_request=True is set.

This bug is fixed in Tornado 6.5.6. max_body_size is now checked both for the compressed and cumulative decompressed size of the response.

Prior to upgrading, this issue can be mitigated by setting decompress_response=False or using CurlAsyncHTTPClient.

Severity

High Basis: CVSS v3 score 7.5, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2026-07-13 15:46 UTC
Modified
2026-07-13 16:33 UTC

Affected packages and fixes

tornado

PyPI · All systems

Affected

  • introduced 0, fixed 6.5.6 (ecosystem)

Fixed versions

6.5.6

Fix

  • Fixed version 6.5.6
    pip install --upgrade tornado==6.5.6

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences