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.
- 01 What happened?
- 02 What is the impact?
- 03 What do you do?
What a strong answer covers
Try it out loud first. Then check yourself:
- Clean origin plus a recurring bad cached copy points to web cache poisoning: an unkeyed input reflected into a cacheable response
- Find the input: diff cached vs origin responses, search origin logs near cache misses for X-Forwarded-Host or odd params
- Contain: purge, then strip untrusted forwarding headers at the CDN or add them to the cache key; cut TTLs while fixing
- Treat it as XSS on every visitor in the window: scope POPs and duration, rotate exposed sessions, check for skimming
- 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.