Skip to content
Cache bugs Write-up Intermediate

Web Cache Poisoning via an Unkeyed Query Parameter

The web cache did not include certain UTM query parameters in its cache key, so an attacker could inject a script via such a parameter and have the poisoned response cached and served to other visitors. This allowed reflected XSS to become stored for all users until the cache refreshed.

bashoverflow Follow

Published on bashoverflow.medium.com

This vulnerability arises when a web cache does not properly include all query parameters in its cache key. In many implementations, certain parameters — often used for analytics or marketing purposes, such as utmsource or utmcampaign— are intentionally ignored to maximize cache efficiency.

Bash Overflow, on bashoverflow.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

Impact

Attackers could poison high-traffic pages such as the homepage or login page, causing every visitor to receive malicious content that could steal cookies or session tokens, or perform actions on behalf of authenticated users.

What the attacker needed

Cache ignores certain query parameters; application reflects those parameters

How it was found

  1. Send a GET request to the homepage to Burp Repeater.
  2. Add a cachebuster parameter to confirm cache misses occur.
  3. Inject a script payload via the cachebuster parameter and observe it executes only for the attacker.
  4. Replace cachebuster with a UTM parameter that is excluded from the cache key.
  5. Send the request repeatedly until the response shows a cache hit.
  6. Remove the payload and refresh the homepage; the script still executes from the poisoned 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 web cache stores copies of pages to serve them faster. If the cache ignores part of the request (like a tracking parameter) when deciding which stored copy to use, an attacker can sneak malicious code into that ignored part. The cache then serves the malicious page to everyone else.

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 bashoverflow

View all

3 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.