Skip to content
Cache bugs Write-up Intermediate

Cache Crash: How I Poisoned CDN Responses and Became Every User

The CDN cached user-specific API responses publicly, and unkeyed headers allowed cache poisoning. An attacker could poison the cache to serve malicious scripts or steal cached session data, leading to account takeover.

iski Follow

Published on infosecwriteups.com

Free link 🎈

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

Likely the CDN was configured to cache responses containing user-specific data and did not include certain request headers in the cache key, allowing cache poisoning.

Impact

The attacker could hijack sessions, deliver XSS to all cached page visitors, steal credentials, and achieve account takeover, potentially affecting thousands of users.

What the attacker needed

CDN caches user-specific responses; Unkeyed headers accepted; No authentication required to poison

How it was found

  1. Send a request to the target URL and observe cache headers such as X-Cache, Cache-Control, and Age.
  2. Test various headers to see if they affect the cache status (MISS/HIT).
  3. Identify headers that are not part of the cache key by sending a request with the header and then a normal request to check if the poisoned response is served.
  4. Inject a malicious payload via the unkeyed header to poison the cache.
  5. Verify that the payload is served from cache to subsequent users.
  6. Use the poisoned cache to deliver XSS or steal cached session 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.

A CDN (content delivery network) stores copies of web pages to serve them faster. If it stores private pages without checking who is asking, anyone can see another user's data. The author also found that some request headers were not considered when deciding which cached copy to serve, so they could trick the CDN into storing a malicious version for everyone.

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 iski

View all

186 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.