Skip to content
Cache bugs Write-up Intermediate

Day 29: The Web Cache Deception Heist — How I Stole Private Data Without Breaking a Single Password

The application server returned private account pages for URLs with a static file extension appended, and the cache stored these responses as public. An attacker could trick a logged-in user into visiting such a URL, then retrieve the cached private data without authentication.

Aman Sharma Follow

Published on infosecwriteups.com

Welcome to Day 29 of our bug bounty exploration! Today’s vulnerability is one of the most elegant and subtle ones I’ve ever encountered.

Aman Sharma, 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 cache decided what to store based on the URL file extension instead of respecting the origin server's Cache-Control: private header, and the application server did not reject unexpected extensions on sensitive routes.

Impact

An attacker could retrieve a victim's private financial data without knowing their password, though the attack is blind and requires the victim to visit a crafted URL first.

What the attacker needed

Victim is logged in; victim visits a crafted URL; cache misconfigured to cache by extension

The fix

The application server should return 404 for unexpected file extensions on sensitive routes, and the cache should strictly respect Cache-Control headers rather than URL extensions.

How it was found

  1. Log in to the target application and navigate to a private page.
  2. Append a static file extension such as .css to the URL and load it.
  3. Copy the URL and open it in an Incognito window where you are not logged in.
  4. If the private page is shown, Web Cache Deception is confirmed.

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 storage layer that keeps copies of web pages to serve them faster. Normally, private pages are marked so they are not stored. Here, the cache ignored that marking because the URL ended in .css, so it saved a private page and later showed it to anyone who asked for that URL.

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 Aman Sharma

View all

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