Web cache deception happens when a website’s cache mistakenly treats a private, user-specific response as a public file and stores it for reuse. If an attacker can make a victim visit a crafted URL and then request the cached response, information intended only for that victim may be exposed to other visitors.
What a shared web cache does
A web cache temporarily saves responses so later requests can be served faster or with less work for the origin server. Caches can sit in a browser, a reverse proxy, or a content delivery network (CDN); “shared cache” generally means a proxy or CDN serving responses to multiple users.
To decide whether a saved response can be reused, a cache applies a cache key and rules. The key commonly includes the URL, and may also account for selected request details such as query parameters or headers. The origin server can guide caching with HTTP headers, including Cache-Control. Correctly configured systems avoid sharing personalized responses, for example by marking them private or no-store, as appropriate.
Cache behavior depends on both the cache and the application. A CDN may have custom rules, and a framework or proxy may normalize URLs differently from the origin server. This disagreement is central to cache deception.
How the deception works
The attack exploits a mismatch between how the application interprets a URL and how the cache decides whether it looks cacheable. An application might route a request to a private account page even when the URL ends in a filename-like segment. A cache, meanwhile, may treat that segment or extension as evidence that the response is a static asset.
- A victim is authenticated. The victim has an active session on a site that returns personal content, such as account details.
- A crafted URL is requested. The attacker causes or persuades the victim’s browser to request a URL that the application resolves to a private page but the cache considers cacheable. This is often called a cache-deception URL.
- The cache stores the response. If the response is not protected from shared caching, the cache may save the private page under a key derived from the crafted URL.
- Another request retrieves it. The attacker requests the same cache key. If the cache serves the stored response without separating users, private content may be returned to the attacker.
For example, suppose an application serves a signed-in user’s account page at /account, but also routes /account/profile.css to that same page. If a cache is configured to cache requests ending in .css while the application ignores that suffix, the response might be stored under the latter URL. The example describes a configuration weakness, not a universal behavior: a correctly configured cache or application may reject, bypass, or mark the response uncacheable.
What can be exposed—and what must be true
Potentially exposed material is whatever sensitive content appears in the cached response: account information, private messages, or other page content. The risk is not that a cache automatically discovers private data. The vulnerability requires several conditions to align:
- The application returns a private or user-specific response for a URL the cache treats as cacheable.
- The shared cache is permitted or configured to store that response.
- The cache key and request handling allow another visitor to retrieve the stored object.
- An attacker can cause the relevant request and identify or access the cache key.
Exposure may be limited by cache lifetime, geographic or server-specific cache behavior, authentication checks, and whether the response is actually reused. Conversely, a response can remain available until it expires or is purged, depending on cache policy. A successful request in a test does not by itself prove that every user or every cache location is affected.
Cache deception versus cache poisoning
These terms describe related but distinct problems. In cache deception, the attacker aims to make a cache store a private response and retrieve it through a shared cache. In cache poisoning, the attacker aims to make a cache store a response that has been manipulated or otherwise undesirable, so subsequent visitors receive the wrong content. Both depend on unsafe assumptions about cache keys, request handling, or response rules, but the attacker’s objective differs.
Neither should be confused with ordinary browser caching. A browser’s private cache is generally associated with one user’s browser; the concern here is a shared intermediary that may serve one user’s response to another.
How site operators can prevent it
Prevention requires aligning application routing, response headers, and cache rules rather than relying on a filename-looking URL to be harmless.
- Mark personalized responses appropriately. Use response directives such as
Cache-Control: privateto prevent shared-cache reuse, orno-storewhen the response should not be stored. Confirm how the particular CDN and proxies interpret these directives. - Cache only known public routes. Prefer explicit allowlists for static assets and public pages over broad rules such as “cache every URL ending in a file extension.”
- Make routing consistent. Reject unexpected path suffixes on private routes, or ensure they cannot resolve to the same personalized response as the normal route.
- Review cache keys and variation. Check which parts of the URL and request determine a cache entry. Do not assume that cookies or authorization information automatically separate users unless the cache is configured to do so.
- Test both sides of the boundary. Verify that public assets are cached as intended and that authenticated pages are not shared. Inspect response headers and cache-status indicators, while accounting for the specific cache product’s behavior.
Adding a cache-busting query string is not a reliable fix by itself: caches may ignore or normalize query parameters, and the underlying private response may remain cacheable. Likewise, clearing a cache can remove an exposed object temporarily but does not correct the rules that allowed it to be stored.
What users should do if they suspect exposure
A user generally cannot inspect or change a website’s CDN configuration. If a page appears to expose another person’s information, avoid repeatedly accessing, saving, or sharing it. Report the affected URL and relevant circumstances to the site through its security or support channel. Site operators should investigate cache behavior, purge affected objects where appropriate, and assess whether other sensitive responses may have been stored.
For personal accounts, signing out or changing a password may not remove a response already stored in a shared cache. Those steps can address account access concerns, but the site operator must address the cache configuration and stored content. Do not attempt to test the issue against accounts or systems you do not own or have permission to assess.
Frequently Asked Questions
What is web cache deception in simple terms?
It is a flaw where a shared cache mistakes a private page for a reusable public resource, stores it, and may serve it to another visitor.
Does web cache deception mean my browser saved someone else’s data?
Usually the concern is a shared proxy or CDN, not an ordinary cache confined to your own browser. The exact risk depends on the site’s cache configuration.
Can HTTPS prevent web cache deception?
No. HTTPS protects traffic in transit between endpoints, but a CDN or reverse proxy that terminates HTTPS may still cache responses. Cache rules and response handling must also be correct.
Is web cache deception the same as cache poisoning?
No. Deception targets the exposure of a private response through shared caching; poisoning targets making a cache serve a manipulated or incorrect response.
How can I tell whether a page is cached?
Response headers or cache-status indicators may provide clues, but they vary by provider and are not conclusive on their own. Site operators need to test the actual cache path and confirm whether personalized responses can be reused.
What is the main defense against web cache deception?
Prevent shared caches from storing personalized responses, and configure caching narrowly so only intended public content is reusable. Ensure the application and cache interpret each URL consistently.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Valheim Server Not Showing in Community List Fixes
- DisplayPort vs HDMI: Which Cable Should You Use?
- Soundbar vs 2.1 Speaker System: Which Is Better?
- Survive Lava for Brainrot Tier List170 points
- MySQL Dump Import: Fix Common Errors
- Mouse Moving on Its Own? Causes & Fixes