Skip to content
Cache bugs Write-up Intermediate

Exposing Sensitive Data via Web Cache Deception

The web application cached authenticated JSON responses when a fake file extension was appended to the URL, allowing an attacker to trick a victim into caching their own sensitive data. The attacker could then retrieve the cached response and access the victim's email, billing information, and subscription details.

medium.com

Published on medium.com

Hey everyone, Today I’m sharing an impactful vulnerability I discovered on bug bounty program at hackerone, The bug? A classic case of Web Cache Deception — but with real consequences, including exposure of email addresses, billing data, and subscription information through a cached response.

Ahmed Elghazaly, 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

Impact

An attacker could retrieve a victim's cached sensitive data, including email addresses, billing information, and subscription details, but the exploit required the victim to visit the manipulated URL while logged in.

What the attacker needed

Two accounts on the target; victim clicks a link while logged in; attacker can capture and replay requests

The fix

The server should validate URL paths and not serve authenticated content for URLs with fake file extensions, and caching rules should be configured to avoid caching sensitive responses.

How it was found

  1. Create two accounts on the target console.
  2. Log into your own account and capture traffic with Burp Suite.
  3. Access the authenticated endpoint /app/settings/profile, which returns a JSON response with account data.
  4. Change the URL to include a semicolon and fake file extension: /app/settings/profile;test.js.
  5. Observe the response header cf-cache-status: HIT, confirming the response was cached.
  6. Share the manipulated link with the victim; when they open it while logged in, their response is cached, and revisiting the link reveals their sensitive data.

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.

Web Cache Deception is when a website's caching system is tricked into storing private information that it shouldn't. By adding a fake file extension to a URL, an attacker can make the cache think it's a public file and save it. Then anyone who visits that same URL can see the private data of the person who first loaded it.

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.