Skip to content
Cache bugs Write-up Intermediate

When Bug Bounty Hunting Hit Me Back: How Losing $500 Led Me to a

A web application reflected a user-controlled header into its HTML and cached the response without including the header in the cache key, allowing an attacker to poison the cache. Visitors to the affected page could then receive attacker-influenced content from the trusted domain.

kjulius Follow

Published on infosecwriteups.com

Bug bounty hunting is excited. You find vulnerabilities, report them, help secure companies, and sometimes get rewarded for it.

kjulius, on infosecwriteups.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 did not include the X-Original-Host header in the cache key while the application reflected that header into the response.

Impact

An attacker could poison cached pages seen by multiple visitors, manipulate canonical URLs used by search engines, inject attacker-controlled URLs, and use the poisoned content for phishing or social engineering; victims only need to visit the normal website.

What the attacker needed

Ability to send crafted HTTP requests; target uses a cache that ignores the header

How it was found

  1. Intercept the homepage request and note that the response is publicly cacheable.
  2. Use Param Miner to guess headers and identify X-Original-Host as unkeyed.
  3. Send a request with a cache-busting parameter and a malicious X-Original-Host value.
  4. Observe that the malicious host is reflected into the HTML and the response is cached.
  5. Remove the malicious header and revisit the same URL to confirm the poisoned response is still served 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 store that keeps copies of web pages so they load faster for everyone. If a site builds a page using something the visitor controls, like a request header, but the cache does not treat that header as part of the page's identity, an attacker can make the cache save a tampered copy. Other visitors then get that tampered copy from the real site.

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.

More by kjulius

View all

11 more disclosed reports, best first.

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.