# CVE-2026-31958: Tornado denial of service in multipart form parsing

Source: https://junglewise.ai/threats/cve-2026-31958-tornado-denial-of-service-in-multipart-form-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-12. Updated: 2026-06-08  
License: CC BY 4.0 with a link back

CVE-2026-31958 · Severity: high · CVSS 7.5 · Published 2026-03-12

Tornado, a popular Python web framework and networking library, is vulnerable to a denial-of-service attack. An attacker can send a specially crafted web request containing an excessive number of form parts, causing the server to spend significant time processing the request. This can lead to the application becoming unresponsive to legitimate users, potentially causing service outages.

Technologies: [tornado (PyPI)](https://junglewise.ai/threats/technologies/tornado). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-31958 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-31958 being exploited in the wild.

**How severe is CVE-2026-31958?** High severity, with a CVSS score of 7.5, published 12 March 2026.

**Which products and versions are affected?** tornado (PyPI) <= 6.5.4, ECOSYSTEM:introduced=0,fixed=6.5.5.

**Is there a fix for CVE-2026-31958?** Yes. tornado (PyPI): upgrade to 6.5.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-31958 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-31958?** Check whether you run tornado (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- tornado (PyPI): upgrade to 6.5.5 or later

  ```sh
  pip install "tornado>=6.5.5"
  ```


## Technical details

In Tornado versions prior to 6.5.5, the multipart/form-data parser lacks a limit on the number of parts allowed in a request, constrained only by the overall 'max_body_size'. Because parsing occurs synchronously on the main event loop thread, an attacker can submit a request with a very large number of small parts to consume excessive CPU cycles. This results in a denial-of-service (DoS) condition by blocking the main thread. The vulnerability is addressed in version 6.5.5 by introducing a default limit of 100 parts per request and providing new configuration options via 'tornado.httputil.ParseMultipartConfig'.

## Affected products

- TornadoWeb Tornado <= 6.5.4

## Identifiers

- CVE-2026-31958
- GHSA-qjxf-f2mg-c6mc
- PYSEC-2026-140

## Timeline

- 2026-03-10: disclosed: Vulnerability published to tornadoweb/tornado repository
- 2026-03-11: advisory: Published to NVD
- 2026-03-12: advisory: Published to GitHub Advisory Database
- 2026-03-12: patched: Version 6.5.5 released

## References

- [https://api.github.com/users/0x-Apollyon](https://api.github.com/users/0x-Apollyon)
- [https://github.com/0x-Apollyon](https://github.com/0x-Apollyon)
- [https://api.github.com/users/0x-Apollyon/gists%7B/gist_id%7D](https://api.github.com/users/0x-Apollyon/gists%7B/gist_id%7D)
- [https://api.github.com/users/0x-Apollyon/repos](https://api.github.com/users/0x-Apollyon/repos)
- [https://avatars.githubusercontent.com/u/149272988?v=4](https://avatars.githubusercontent.com/u/149272988?v=4)
- [https://api.github.com/users/0x-Apollyon/events%7B/privacy%7D](https://api.github.com/users/0x-Apollyon/events%7B/privacy%7D)

## Related threats

- [Tornado open redirect in RedirectHandler URL templates](https://junglewise.ai/threats/cve-2026-116578-tornado-is-a-python-web-framework-and-asynchronous-networking)
- [Tornado HTTP header parser quadratic CPU consumption via line folding](https://junglewise.ai/threats/cve-2026-116577-tornado-is-a-python-web-framework-and-asynchronous-networking)
- [Tornado HTTP/1.1 chunked encoding denial of service](https://junglewise.ai/threats/cve-2026-115927-tornado-is-a-python-web-framework-and-asynchronous-networking)
- [Tornado StaticFileHandler path traversal via symlinks](https://junglewise.ai/threats/cve-2026-103263-tornado-staticfilehandler-follows-symlinks-outside-static-root)
- [Tornado CurlAsyncHTTPClient unbounded memory accumulation in decompression](https://junglewise.ai/threats/cve-2026-103262-tornado-curlasynchttpclient-enforces-no-response-size-limit)
