CVE-2023-23916: HTTP multi-header compression denial of service
A server could send an HTTP response containing many Transfer-Encoding and Content-Encoding headers, and each listed encoding caused a buffer to be allocated. Because the number of such headers was not bounded, a malicious response could exhaust all available memory and cause a denial of service.
- Triaged in 7 hours
- Fixed in 38 days
- Disclosed after 43 days
Summary:
A server can send an HTTP response with many occurrences of Transfer-Encoding and/or Content-Encoding headers. Each listed encoding allocates a buffer. The number of encodings listed within each header is already bounded but the number of headers is not, allowing an HTTP response to consume all available memory.
Steps To Reproduce:
Using the curl test environment:
- Extract test418 from the attached patch
- runtests.pl 418
Supporting Material/References:
Patch fixing the problem and new test for the case.
Impact
Denial of service.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the code bounded the number of encodings within a single header but did not limit the total number of Transfer-Encoding and Content-Encoding headers, so each header still triggered a buffer allocation.
Impact
A malicious or compromised server could cause a denial of service by exhausting the client's memory.
What the attacker needed
Attacker controls or spoofs the server; client processes the crafted response
The fix
The problem was fixed by a patch that also adds a new test for the case.
How it was found
- Extract test418 from the attached patch.
- Run the test using the test runner.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The program reserved memory for every encoding named in the response headers, but only limited encodings per header, not the number of headers. A malicious server could make the client use up all its memory.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.