Lion Cipher Lab

Poison a web cache with an unkeyed header — then key it, normalize it, and shut the hole

Why it matters

A single reflected header looks harmless when it only changes the attacker's own page. Put a shared cache in front of that app — a CDN, a reverse proxy, Varnish, an nginx cache — and the same bug becomes a broadcast weapon: the attacker sends ONE crafted request, the cache stores the poisoned response, and then serves it to thousands of ordinary users under the normal URL. That is web cache poisoning, and it turns a low-severity 'reflected' finding into stored XSS, malicious script delivery, or a site-wide denial of service, all without the victims doing anything unusual. The reason it keeps…

What you'll learn

Steps in this lab

  1. The one idea: keyed vs unkeyed inputs
  2. Build the target: a caching proxy in front of a trusting origin
  3. Baseline: watch the cache warm up
  4. Find the unkeyed input — safely, with a cache buster
  5. Poison the cache and hit a victim
  6. Fix #1 — stop reflecting untrusted input (the root cause)
  7. Fix #2 — when a response MUST vary on an input, put it in the key
  8. Fix #3 — don't cache what shouldn't be cached
  9. What a pro does differently — and when this bites hardest
  10. Clean up

Open the full interactive lab →