CVE-2026-31958: Tornado is vulnerable to DoS due to too many multipart parts
In versions of Tornado prior to 6.5.5, the only limit on the number of parts in multipart/form-data is the maxbodysize setting (default 100MB). Since parsing occurs synchronously on the main thread, this creates the possibility of denial-of-service due to the cost of parsing very large multipart bodies with many parts.
Published Mar 12, 2026 · Updated Jun 8, 2026
Affected packages
tornado
- Ecosystem
- PyPI
- Affected
- <= 6.5.4
- Fixed in
- 6.5.5
- Check
pip show tornado
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
In versions of Tornado prior to 6.5.5, the only limit on the number of parts in multipart/form-data is the max_body_size setting (default 100MB). Since parsing occurs synchronously on the main thread, this creates the possibility of denial-of-service due to the cost of parsing very large multipart bodies with many parts.
Tornado 6.5.5 introduces new limits on the size and complexity of multipart bodies, including a default limit of 100 parts per request. These limits are configurable if needed; see tornado.httputil.ParseMultipartConfig. It is also now possible to disable multipart/form-data parsing entirely if it is not required for the application.
Credited to 0x-Apollyon, bekkaze.
References
- https://github.com/tornadoweb/tornado/security/advisories/GHSA-qjxf-f2mg-c6mc
- https://nvd.nist.gov/vuln/detail/CVE-2026-31958
- https://github.com/tornadoweb/tornado/commit/119a195e290c43ad2d63a2cf012c29d43d6ed839
- https://github.com/tornadoweb/tornado/releases/tag/v6.5.5
- https://lists.debian.org/debian-lts-announce/2026/04/msg00000.html
- https://github.com/pypa/advisory-database/tree/main/vulns/tornado/PYSEC-2026-140.yaml
- https://github.com/advisories/GHSA-qjxf-f2mg-c6mc
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-126347
Tornado: Open redirect via triple-slash redirect paths
low3.1Nov 13, 2026CVE-2026-115927
Tornado: Event loop blocking and excess memory use from chunked bodies with many small chunks
medium5.3Oct 28, 2026CVE-2026-116577
Tornado: Quadratic CPU usage when parsing HTTP headers with line folding
medium5.3Oct 28, 2026CVE-2026-116578
Tornado: Open redirect in RedirectHandler via protocol-relative URLs
low2.1Oct 28, 2026GHSA-3hv7-mjh2-fv65
Tornado: Unbounded query-string argument count allows event-loop-stalling DoS
medium5.3Sep 30, 2026GHSA-c2m8-h5v5-343r
Tornado: StaticFileHandler follows symlinks outside static root (path traversal)
high8.2Sep 30, 2026
