Tinyproxy HTTP Connection Headers use-after-free vulnerability
A use-after-free vulnerability in Tinyproxy's handling of HTTP Connection headers allows an unauthenticated attacker to send a crafted request that causes memory corruption, potentially leading to remote code execution.
Originally disclosed on Cisco Talos
A use-after-free vulnerability exists in the HTTP Connection Headers parsing in Tinyproxy 1.11.1 and Tinyproxy 1.10.0. A specially crafted HTTP header can trigger reuse of previously freed memory, which leads to memory corruption and could lead to remote code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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
The code frees the value of a header and then reuses a pointer to that freed memory when the header name matches the value, due to case-insensitive hashing.
Impact
The vulnerability could lead to memory corruption and potentially remote code execution, but no patch is available and the vendor did not respond.
What the attacker needed
Unauthenticated HTTP request
How it was found
- Send an HTTP request with a Connection header whose value is 'Connection'.
- Alternatively, send a Connection header with any value and a Proxy-Connection header with value 'Proxy-Connection'.
- The proxy processes the headers and triggers the use-after-free.
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.
Tinyproxy is a small web proxy server. When it processes certain headers, it frees memory and then uses it again, which can crash the program or let an attacker run their own code. This is called a use-after-free bug.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.