Skip to content
Cache bugs Write-up Intermediate

How I Discovered a Web Cache Deception Attack Exposing PII — A Real-World Case Study

The application's cache misclassified a dynamic account page as a static CSS file because the URL ended in .css, so the authenticated response containing PII was stored and served to unauthenticated visitors. An attacker who knew the crafted URL could retrieve another user's personal data from the cache.

Pratik Dabhi Follow

Published on infosecwriteups.com

I’m Pratik Dabhi, a Bug Bounty Hunter and Penetration Tester. In today’s blog post, I want to share an interesting vulnerability I discovered while testing a multinational company’s web application.

Pratik Dabhi, 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

The cache decided whether to store a response based on the file extension in the URL rather than the response's Content-Type or Cache-Control headers, so dynamic account data was cached as if it were a static file.

Impact

Any attacker who knows the crafted URL can cause the cache to store sensitive data, which then becomes publicly available to anyone who visits that link, regardless of login status.

What the attacker needed

A user account on the target; victim visits the crafted URL while logged in; attacker knows the crafted URL

The fix

Caching decisions should not rely on URL extensions alone; the cache should check the response Content-Type and honour Cache-Control: no-store or private so dynamic content is never stored.

How it was found

  1. Log in to the target application with a user account.
  2. Craft a URL for the account page that ends with a static file extension such as .css.
  3. Open the crafted URL in a private browsing session where you are not logged in.
  4. Inspect the page source and observe that it contains the PII of the logged-in user.

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.

Websites often use a cache to store copies of pages so they load faster for everyone. This site decided what to cache based on the file extension in the address, so a page showing your private account details was saved as if it were a public style sheet. Anyone who visited that special address could then see the saved private information without logging in.

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 Pratik Dabhi

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.