Open cardosec

Case 7F2E8B · Web AppSec · L5 Expert

CDN Serves Attacker JavaScript

Practise as: Incident drill

Live alertAt 16:05 users in three regions report the homepage loading app.js from a domain you do not own; origin responses are clean, a CDN purge fixes it, but it returns within the hour.

  1. 01 What happened?
  2. 02 What is the impact?
  3. 03 What do you do?
What a strong answer covers

Try it out loud first. Then check yourself:

  1. Clean origin plus a recurring bad cached copy points to web cache poisoning: an unkeyed input reflected into a cacheable response
  2. Find the input: diff cached vs origin responses, search origin logs near cache misses for X-Forwarded-Host or odd params
  3. Contain: purge, then strip untrusted forwarding headers at the CDN or add them to the cache key; cut TTLs while fixing
  4. Treat it as XSS on every visitor in the window: scope POPs and duration, rotate exposed sessions, check for skimming
  5. Also review key normalization gaps (param cloaking, fat GET, case) and do not confuse it with cache deception of private pages

If the interviewer pushes back

  • The vulnerable header is needed by the origin for redirects. How do you keep the feature and close the hole?
  • How would you test every route for unkeyed inputs without poisoning the live cache yourself?

cardosec draws a security topic and gives you a clock: explain it out loud with no notes, then see what you covered and what you missed. Free during early access.