Tornado is a Python web framework and asynchronous networking library. In versions 6.5.2 and below, a single maliciously crafted HTTP request can block the servers event loop for an extended period, caused by the HTTPHeaders.add method. The function accumulates values using string concatenation when the same header name is repeated, causing a Denial of Service (DoS). Due to Python string immutability, each concatenation copies the entire string, resulting in O(n²) time complexity. The severity can vary from high if max_header_size has been increased from its default, to low if it has its default value of 64KB. This issue is fixed in version 6.5.3.
The product does not properly control the allocation and maintenance of a limited resource.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Tornado | Tornadoweb | * | 6.5.3 (excluding) |
| Red Hat Enterprise Linux 8 | RedHat | pcs-0:0.10.18-2.el8_10.8 | * |
| Python-tornado | Ubuntu | esm-apps/bionic | * |
| Python-tornado | Ubuntu | esm-apps/focal | * |
| Python-tornado | Ubuntu | esm-apps/jammy | * |
| Python-tornado | Ubuntu | esm-infra/xenial | * |
| Python-tornado | Ubuntu | jammy | * |
| Python-tornado | Ubuntu | noble | * |
| Python-tornado | Ubuntu | plucky | * |
| Python-tornado | Ubuntu | questing | * |
Mitigation of resource exhaustion attacks requires that the target system either:
The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question.
The second solution is simply difficult to effectively institute – and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.