October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

What Is Web Cache Deception? How Attackers Can Make a Cache Store Private Data

Web cache deception happens when a shared cache stores a personalized response as if it were safe to share. Learn how the mismatch occurs and how to defend against it.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Web cache deception is a vulnerability that can expose private information when a shared cache stores a personalized response under a URL it considers cacheable. If an authenticated user’s request fills that cache entry and an attacker can request the same cache key, the attacker may receive the user’s data. The flaw is a mismatch between how the cache and application interpret a URL—not simply the presence of a CDN.

How web cache deception works

A shared cache sits between a client and an application’s origin server. It decides whether a request matches a stored response and whether a new response should be saved. Deception occurs when the origin returns user-specific content but the cache treats the response as safe to share.

As an Amazon Associate I earn from qualifying purchases.

A common cause is a difference in URL interpretation. An origin might route both /account and /account/photo.jpg to the same personalized handler, while the cache treats the added static-looking extension as a reason to store the response. The cache can then serve that response to another requester of the same cache key. This is an illustrative pattern, not a universal exploit: routing and cache rules determine whether it applies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Other potential mismatches involve path normalization, encoded separators, dot segments, delimiters, or framework-specific URL-to-handler mapping. Behaviors vary across cache products, proxies, frameworks, and application routes; finding one unusual path does not prove that another route is vulnerable.

The typical attack sequence

  1. A victim is signed in and requests a URL that returns personalized information.
  2. An attacker causes the victim to request a crafted URL, such as one with a static-looking suffix or path variation that may be interpreted differently by the cache and origin.
  3. The origin returns the victim’s private response, and the cache stores it under a key it considers shareable.
  4. The attacker requests that same cache key and may receive the stored response.

A static-looking URL alone is not evidence of exposure. The relevant question is whether the origin returns personalized content for that path and whether the shared cache stores and replays it.

How cache deception differs from cache poisoning

Web cache deception aims to expose private content by getting a cache to store a personalized response under a cacheable-looking URL. Web cache poisoning instead aims to make a cache store and serve a harmful response to other users, often because an input affects the response but is not represented correctly in the cache key. Both involve cache design, but the attacker’s outcome differs. OWASP discusses cache-security controls in its Web Cache Security Cheat Sheet; PortSwigger explains the deception pattern in its Web cache deception guide.

How to prevent web cache deception

Keep sensitive responses out of shared caches

OWASP recommends Cache-Control: no-store for sensitive responses. For non-sensitive content that may be retained only in a private cache and should be revalidated, its guidance gives Cache-Control: private, no-cache. Ensure that CDN or reverse-proxy rules do not override the application’s intended policy for sensitive content.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make cache eligibility explicit

Use allowlisted route rules so only intended, non-personalized resources are publicly cacheable. Do not rely solely on a filename extension to decide that a response is static. Configure dynamic routes to reject unexpected path segments or static-looking suffixes rather than silently routing them to the same personalized handler.

Keep URL handling consistent across layers

Align path normalization and parameter handling across the CDN, reverse proxy, framework, and origin. Review how each layer handles suffixes, encoded separators, dot segments, delimiters, and query parameters. A mismatch can create unexpected routing or caching behavior.

Consider content-type checks as one defensive layer

Cloudflare documents Cache Deception Armor as a cache rule that checks whether a URL extension matches the response’s Content-Type; its documentation says a mismatch indicating possible deception is not cached. This is a platform-specific defense, not a replacement for correct response headers, route design, authorization, or testing. See Cloudflare’s Cache Deception Armor documentation.

How to test safely

Test only systems for which you have authorization, and send test requests through the same CDN and proxy path used in production. No universal suffix or path variation establishes exploitability; select cases based on the application’s actual routes and configuration.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Identify a sensitive route and record the expected personalized response for an authorized test account.
  2. Compare it with requests that add unexpected path segments, static-looking suffixes, or relevant normalization variants. Use fresh cache keys so an earlier response does not confuse the result.
  3. Observe both the response body and cache indicators. Determine whether the origin returns the same personalized content for the altered path and whether the shared cache stores and replays it.
  4. Repeat with distinct authorized accounts or tenants. Verify that neither identity can receive the other’s response, including after logout or permission changes.
  5. Check relevant headers and query parameters, as well as purge behavior, through the deployed delivery path.

The decisive evidence is the combination of origin behavior and cache behavior: an altered path reaches the personalized handler, and a shared cache stores and replays that response. OWASP recommends validating behavior across the full path; the precise test cases depend on the application and cache rules.

Best Value
Sale
The Web Application Hacker's Handbook: Finding and Exploiting Security Flaws
  • Comes with secure packaging
  • It can be a gift item
  • Easy to read text
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to do if you find a suspected exposure

Identify the affected routes and cache layers, stop the vulnerable responses from being cached, and purge potentially affected entries after correcting the route or cache policy. Follow the system’s incident procedures: the appropriate remediation depends on how the response was cached and which layers served it. OWASP discusses purging affected layers and correcting cache-key or origin behavior in its cache-security guidance.

Quick Recap

Questions to use when reviewing cache defenses

  • Eligibility: Are only explicitly approved, non-personalized routes publicly cacheable?
  • Response policy: Do sensitive responses use no-store, and can a shared-cache rule override that policy?
  • URL interpretation: Do the CDN, proxy, framework, and origin handle paths and parameters consistently?
  • Authorization: Can a cache hit cross user, tenant, or object-authorization boundaries?
  • Visibility: Can the team observe cache status and test responses across identities through the real delivery path?
  • Platform-specific checks: Does the cache validate that a static-looking URL matches the returned content type, and what does that control leave uncovered?

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.