How a “Safe” Analytics Endpoint Leaked Real User Behavior
An unauthenticated analytics endpoint was publicly cached by a CDN without a Vary header, so responses containing user behaviour data could be stored and served to anyone. An attacker could inject headers to poison the cache and later retrieve sensitive information such as user IDs, session IDs, and email domains.
Free link 🎈
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 analytics endpoint lacked authentication and the CDN cache did not vary on request headers, allowing cached responses to be shared across users.
Impact
An attacker could passively monitor user behaviour and access sensitive data like user IDs, session IDs, and email domains, leading to privacy leakage at scale.
What the attacker needed
No authentication required; endpoint is publicly cached
The fix
The endpoint should require authentication and the cache should include a Vary header or not cache sensitive responses.
How it was found
- Find the analytics endpoint /v3/collect/events using recon tools.
- Send a request with custom headers like X-Forwarded-For and X-Device-ID to influence the response.
- Wait for the response to be cached.
- Fetch the same endpoint without headers to retrieve the cached data containing user behaviour.
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 caching system stores copies of web responses to speed things up. If it doesn't distinguish between different users' requests, one person's data can be saved and shown to others. Here, an analytics endpoint that logged user actions was cached without proper separation, so anyone could see what other people did.
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.