The 30-Year-Old Bug in Your Proxy: Unpacking “Squidbleed” (CV
A heap buffer over-read in Squid's Gopher protocol handler allows an unauthenticated remote attacker to leak sensitive memory contents, including credentials and TLS private keys, by sending a malformed Gopher request through the proxy. The flaw has existed since the 1990s and affects millions of instances.
If you have spent any time managing corporate networks, optimizing bandwidth, or setting up Content Delivery Networks (CDNs), you know Squid. Released in 1996, the open-source caching and forwarding HTTP proxy has served as a cornerstone of internet infrastructure for nearly three decades.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The gopherToHTML function in gopher.cc fails to check that the number of bytes read from a Gopher response does not exceed the size of the output buffer before copying, leading to an over-read.
Impact
An attacker could leak authentication credentials, session tokens, TLS private keys, internal network configurations, and other users' session cookies, though the bug does not allow data alteration or code execution.
What the attacker needed
Network access to the Squid proxy; no authentication required
The fix
The vulnerability was fixed in Squid versions 6.6, 5.9, and 4.17; as a workaround, block Gopher protocol requests or restrict proxy access to internal networks.
How it was found
- Send a malformed HTTP request that targets the Gopher protocol handler through the proxy.
- Squid processes the request and over-reads its heap memory.
- The overflowing data is reflected back to the attacker in the HTTP response.
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 write-up has not been written yet. The Original tab links to the source.
Squid is a piece of software that sits between computers and the internet, caching web pages to speed things up. A bug in how it handles an old, rarely used protocol called Gopher means an attacker can send a specially crafted request and get back chunks of the server's memory, which may contain passwords or encryption keys. No login is needed, so anyone who can reach the proxy can try it.
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.