Web Cache Deception is an attack that tricks a cache into storing a victim's sensitive, dynamic content by exploiting URL parsing inconsistencies between the cache and the application server.
The attacker crafts a URL that the application interprets as a dynamic page (serving personalized content) but the cache interprets as a static resource (and caches it). When the victim visits this URL, their sensitive data gets cached and becomes accessible to the attacker.
1. Attacker crafts malicious URL:
https://example.com/account/settings/nonexistent.css
2. Attacker sends link to victim (phishing, social engineering)
3. Victim clicks link while authenticated
- App server: Ignores "nonexistent.css", serves /account/settings
- Response contains victim's personal data
4. Cache: Sees .css extension, caches the response
5. Attacker requests same URL (unauthenticated)
- Cache serves cached response containing victim's data
# Various path confusion techniques
/account/settings/anything.css
/account/settings/..%2fnonexistent.css
/account/settings;nonexistent.css
/account/settings%00.css
Cache-Control: no-store for sensitive pages