The two byte CPDoS
A CRLF injection in a custom HTTP request header caused an upstream server to return 502 or 504 error responses that were then cached and served to other users. An attacker could send two timed requests to poison the cache and cause a persistent denial of service for unrelated users.
Published on medium.com
CRLF ( CarriageReturn enLineFeed ) basically says “new line here” in text.
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
Likely the cache key did not include the custom header, and the backend failed to reject CRLF characters in that header, so an error response was cached and reused for other requests.
Impact
An attacker could cause a persistent denial of service for other users across IPs and regions, with only two requests per cache window, and the text notes it works over HTTP/1 and HTTP/2.
What the attacker needed
No account needed; two timed requests; shared cache in front of endpoint
How it was found
- Send a request with a CRLF sequence inside a custom HTTP header.
- Observe that the upstream server returns a 502 or 504 error.
- Check that the error response is cached by looking for an incrementing Age header.
- Send a second request within the cache window to confirm the poisoned error is served to other users.
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.
A web cache stores copies of responses so future visitors get them faster. If an attacker can make the cache store an error page instead of the real page, everyone who visits afterwards sees that error until the cache expires. Here, a special newline sequence in a request header confused the backend into producing an error, and the cache saved it.
What is Cache bugs?
A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.