Skip to content
Cache bugs Write-up Beginner

Caching Trouble: The Public Cache That Leaked Private User Data

A personalised API endpoint was served with a public cache header, so its JSON response containing private user data was stored and later returned to unauthenticated requests. An attacker could retrieve other users' cached dashboard details, including email, payment and location information.

medium.com

Published on medium.com

Free Link 🎈

Iski, 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

Root cause

The endpoint returned personalised data with a Cache-Control header of public, max-age=86400 and lacked a Vary header, so shared caches stored and served the response to other users.

Impact

An unauthenticated attacker could browse cached private content of other users, including payment and location history, and potentially harvest hundreds of cached user records.

What the attacker needed

A free account; victim has used the endpoint; shared cache present

The fix

The cache control was updated to private, no-store and the endpoint required auth headers.

How it was found

  1. Log in to a premium account.
  2. Request the dashboard details endpoint.
  3. Copy the exact response with headers.
  4. Log out, clear cookies, use Incognito mode.
  5. Replay the same GET request.

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 is a shared storage that saves responses to speed up later requests. Here the server told the cache that a page containing private account details was public, so anyone asking for the same address could receive someone else's saved data 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.

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.