Skip to content
Cache bugs Write-up Intermediate

I Found Cache Poisoning & Earned $500 in Just a Few Minutes!

The website used CDN-based caching and failed to properly validate unkeyed headers such as Host and X-Forwarded-Host, allowing an attacker to poison the cache with attacker-controlled content. This could serve malicious content like phishing pages or stored XSS to all users.

medium.com

Published on medium.com

One of the easiest yet highly overlooked vulnerabilities in bug bounty hunting is cache poisoning. Recently, I found a simple misconfiguration that allowed me to poison a website’s cache and deliver attacker-controlled content to all users! 💥 This led to a quick $500 bounty, and in this guide, I’ll show you how I did…

TheIndianNetwork, 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 caching layer used unkeyed headers (such as Host or X-Forwarded-Host) when building the cached response, so an attacker could inject content that got stored and served to all users.

Impact

Attackers could serve malicious content such as phishing pages or fake login forms, and stored XSS could be injected, affecting thousands of users; critical pages like login or checkout could be poisoned.

What the attacker needed

Target uses CDN-based caching; cache processes unkeyed headers

How it was found

  1. Send a request to check caching behaviour and look for Cache-Control: public and X-Cache: HIT.
  2. Send a request with a malicious Host header and an X-Forwarded-Host header.
  3. Make a normal request to the same page and observe that the injected content is returned from cache.

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 is a fast storage layer that keeps copies of web pages so they load quicker for everyone. If a website trusts certain request headers (like Host) without checking them, an attacker can trick the cache into storing a tampered version of the page. Then every visitor sees the attacker's content instead of the real page.

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.