PT-2026-85146 · Pypi · Tornado
Published
2026-09-01
·
Updated
2026-09-01
CVSS v4.0
6.9
Medium
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
Description
Summary
parse multipart form data (httputil.py:34) calls
data.split(b"--"+boundary+b"r ") before the max parts check (:35).
A 600KB body with 100k parts creates a 100k-element transient list first,
then rejects transient memory amplification (each split element is a copy).
Pre-auth HTTP DoS.Root cause
python
parts = data[:final boundary index].split(b"--" + boundary + b"r
") # :34 huge list first
if len(parts) > config.max parts: # :35 check after
raise HTTPInputError("multipart/form-data has too many parts")PoC
gist: https://gist.github.com/afldl/649861f25d39b53b7edbe0298e171617
poc.py + output.txt (100k parts from 600KB transient list).Fix
Count separators without materializing the list (e.g.
data.count(b"--"+boundary) first).Credit
Reported by afldl, 2026-07.
Fix
Allocation of Resources Without Limits
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Tornado