Cache Me Outside: How I Poisoned CDN Caches and Hijacked Session
A CDN cached an internal debug endpoint's response containing an admin's session token and AWS credentials, and served it to anyone who requested the same URL. An attacker could retrieve these secrets and gain admin access and cloud credentials.
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 CDN cached a sensitive internal endpoint's response without varying on authentication or restricting caching, so the cached response was served to unauthenticated users.
Impact
An attacker could obtain an admin authentication token and AWS credentials, potentially leading to full administrative access and cloud resource compromise.
What the attacker needed
Admin visits a crafted link; cacheable internal endpoint; CDN caches response
The fix
Sensitive API responses should be marked with Cache-Control: no-store, private and CDN rules should prevent caching of dynamic, user-specific data.
How it was found
- Find a cacheable internal debug endpoint behind a CDN.
- Trick an admin into visiting the endpoint so the sensitive response gets cached.
- Request the same endpoint to retrieve the cached admin token and credentials.
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 content delivery network (CDN) is a service that stores copies of web responses to speed up loading. If a sensitive page is cached without proper access checks, anyone can later fetch that stored copy. Here, an internal debug page was cached and leaked an admin token and cloud keys.
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.