A Bug That Was 23 Years Old Or Not
curl's cookie engine accepted cookies containing control codes in the name or value, and would send them back in subsequent requests. If a server rejected such requests with a 400 response, the client could be denied service for as long as the cookie was sent.
Published on daniel.haxx.se
This is a tale of cookies, Internet code and a CVE. It goes back a long time so please take a seat, lean back and follow along.
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
Impact
A client using curl's cookie engine could be denied service by a server that rejects requests containing control codes, for as long as the cookie keeps being sent.
What the attacker needed
Curl cookie engine enabled; attacker can set a cookie for the victim's domain; server rejects control codes with 400
The fix
curl was fixed to refuse cookie fields containing banned control-code bytes.
How it was found
- Enable curl's cookie engine.
- Receive a Set-Cookie header containing control codes in the name or value.
- curl stores the cookie and sends it back in subsequent requests.
- The server rejects the request with a 400 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.
Cookies are small pieces of data that a website asks your browser (or a tool like curl) to store and send back on later requests. curl did not check for invisible control characters in cookies, so a malicious site could plant one that made later requests invalid. The server would then reject every request, effectively blocking the user from the site.
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.