Press enter or click to view image in full size
In today’s fast-paced digital world, every millisecond counts. Websites use web caching to improve performance — storing copies of web pages so that repeated visits load faster. While this improves user experience, it also introduces a sneaky vulnerability called Web Cache Deception (WCD).
Web Cache Deception is a type of attack where an attacker tricks a website’s caching system into storing sensitive user-specific data in the public cache. Later, anyone can access that cached version — revealing personal details that were never meant to be shared.
Press enter or click to view image in full size
Normally, caching systems store only static content like images or stylesheets, not dynamic pages (like profile pages or dashboards). But in poorly configured websites, the cache doesn’t properly distinguish between the two. This small mistake gives attackers a big opportunity.
Press enter or click to view image in full size
1. User Login – A user logs into a legitimate website, say an online shopping site.
2. Malicious URL – The attacker sends the victim a crafted URL such as:
https://example.com/account.php/nonexistent.cssThe web server still serves the user’s account page, but the caching system thinks it’s a CSS file and stores it publicly.
3. Cached Leak – Later, anyone visiting that same crafted URL can get the cached version — containing the victim’s sensitive information (like username, email, or session details).
Press enter or click to view image in full size
This attack takes advantage of how reverse proxies and content delivery networks (CDNs) handle cacheable responses. If the website fails to validate URLs or set proper cache-control headers, sensitive pages can unintentionally end up cached and publicly visible.
Imagine a banking website:
https://securebank.com/user/profileThis page displays a logged-in user’s personal details.
Now, if an attacker tricks the victim into visiting:
https://securebank.com/user/profile/test.jsand the server still shows the user’s profile page (but the cache thinks it’s a JavaScript file), the response might get cached.
Later, anyone visiting that same crafted URL could view the cached version — exposing private user information without needing to log in.
Web Cache Deception may sound simple, but its impact can be severe — exposing confidential user data with a single click. A single misconfigured cache could turn your fastest page into your biggest security leak.