Skip to content
DoS Write-up Intermediate

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.

Daniel Stenberg Follow

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.

Daniel Stenberg (@bagder), on daniel.haxx.se

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

  1. Enable curl's cookie engine.
  2. Receive a Set-Cookie header containing control codes in the name or value.
  3. curl stores the cookie and sends it back in subsequent requests.
  4. 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.

More by Daniel Stenberg

View all

1 more disclosed report, best first.

More from Internet Bug Bounty (curl)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.