Skip to content
Cache bugs Write-up Intermediate

I Predicted a Vulnerability Before I Even Touched the Target

The application trusted the X-Forwarded-Host header and reflected it in a canonical link, which was then cached globally. An attacker could poison the cache to serve malicious canonical links to other users.

medium.com

Published on medium.com

Free Link🎈

Iski, on medium.com

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 application used the X-Forwarded-Host header to build a canonical URL without validating it, and the response was cached without considering that header.

What the attacker needed

Ability to send HTTP requests with custom headers; target uses CDN caching

How it was found

  1. Find a subdomain that uses CDN caching.
  2. Send a request with a modified X-Forwarded-Host header.
  3. Observe the response containing a canonical link pointing to the attacker's domain.
  4. Refresh the page and check that the response is cached (X-Cache: HIT).

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 cache stores copies of web pages to serve them faster. If a page includes a link based on a header the attacker controls, and that page is cached, everyone who visits later sees the attacker's link. This is called cache poisoning.

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.