Skip to content
Cache bugs Write-up Intermediate

Alternative link

The author found that certain unkeyed HTTP headers (like X-Timer and X-Forwarded-Host) could be used to cause a backend error whose response was cached, poisoning the cache and making the main page inaccessible (denial of service).

zhero-web-sec.github.io

Published on zhero-web-sec.github.io

Let’s take a closer look at how cache poisoning works and how I was able to exploit this vulnerability to get a DOS on the home page of a large company.

The author, on zhero-web-sec.github.io

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 did not include certain request headers in its cache key, so responses that varied based on those headers (such as error pages) were cached and served to other users.

Impact

The cache poisoning could make the main homepage completely inaccessible to users, resulting in a denial of service; the author notes that the attack can be made persistent with repeated requests.

What the attacker needed

Cache must be present; unkeyed header that triggers error; ability to send requests

How it was found

  1. Analyse the server response to identify cache headers such as X-Cache, Age, and Vary.
  2. Test various headers to find ones that are not part of the cache key (unkeyed).
  3. Send a request with a crafted unkeyed header (e.g., X-Timer or X-Forwarded-Host) to trigger a backend error.
  4. Add a cache buster parameter to the URL to avoid affecting real users during testing.
  5. Resend the request if necessary until the error response is cached.
  6. Verify the poisoned response from another browser or IP address.

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 web pages to serve them faster. If an attacker can make the cache store a broken or malicious version of a page, everyone who visits that page gets the broken version. Here, the attacker used special request headers to trigger an error that got cached, so the site's homepage became unavailable for other users.

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.

Similar reports

View all

Same bug class and techniques, clearest first.

Web cache poisoning and deception

The lesson behind this report.

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.