Denial of service through folded HTTP response headers.
The HTTP stream wrapper joins each continuation line of a folded response header to the accumulated value by allocating a new string and copying the whole value, so a response with many short continuation lines takes disproportionate CPU time to parse. An attacker who controls an HTTP or HTTPS response fetched through file_get_contents(), fopen() or other stream functions, by making the application request a chosen URL or by influencing a server it already contacts, can keep PHP workers busy. Repeated or concurrent requests can cause a denial of service.
This issue affects PHP versions from 8.1.32 through 8.1.34, from 8.2.28 before 8.2.36, from 8.3.18 before 8.3.37, from 8.4.5 before 8.4.28 and 8.5.* before 8.5.13.
The product does not properly control the allocation and maintenance of a limited resource.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | RedHat | php8.4-0:8.4.28-1.el10_3 | * |
| Red Hat Enterprise Linux 10.2 Extended Update Support | RedHat | php8.4-0:8.4.28-1.el10_2 | * |
| Red Hat Enterprise Linux 8 | RedHat | php:7.4-8100020261119125714.f7998665 | * |
| Red Hat Enterprise Linux 9.8 Extended Update Support | RedHat | php:8.3-9080020261120133305.9 | * |
| Red Hat Enterprise Linux 9.8 Extended Update Support | RedHat | php:8.2-9080020261120141350.9 | * |
| Php7.0 | Ubuntu | esm-infra-legacy/xenial | * |
| Php7.2 | Ubuntu | esm-infra/bionic | * |
| Php7.4 | Ubuntu | esm-infra/focal | * |
| Php8.1 | Ubuntu | jammy | * |
| Php8.3 | Ubuntu | noble | * |
| Php8.5 | Ubuntu | devel | * |
| Php8.5 | Ubuntu | resolute | * |
| Php8.5 | Ubuntu | stonking | * |
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.