Executive brief
Tornado is a popular Python web framework used to build server and client applications. The CurlAsyncHTTPClient component fails to validate HTTP request headers for carriage return and line feed characters, allowing an attacker to inject malicious headers or construct entirely new HTTP requests if the application passes untrusted header values. This could facilitate server-side request forgery attacks or other header-injection exploits.
Technical details
The vulnerability is a CRLF (carriage return/line feed) injection flaw in Tornado's CurlAsyncHTTPClient class. The root cause is inadequate input validation: when constructing HTTP requests via libcurl's HTTPHEADER option, Tornado does not sanitize header names or values to reject \r and \n characters. An attacker who controls a header value can inject CRLF sequences to add arbitrary headers (e.g., "Foo: Bar\r\nInjected: Header") or inject entire HTTP requests (\r\n\r\nPOST /evil ...) into the same connection. The attack requires the application to include attacker-controlled data in request headers and use CurlAsyncHTTPClient; the standard AsyncHTTPClient does perform validation. The vulnerability is fixed in version 6.4.1 and later.
Affected products
- Tornado Tornado before 6.4.1
Timeline
- 2024-06-06: disclosed: GitHub Security Advisory (GHSA-w235-7p84-xx57) published
- 2024-06-06: patched: Fixed in Tornado 6.4.1
- 2026-09-15: other: CVE-2024-58384 assigned and published to NVD