Skip to content

In-depth lesson · Web cache deception

Tips for beginners

Every point the Web cache deception reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 14 of 14
  1. Start with endpoints that return private data for a signed-in user and check whether they set cache-control headers. Account pages, profile APIs, login pages with CSRF tokens and raw or preview endpoints are good first targets. If a response lacks no-cache headers and contains personal data, test whether appending a static-looking suffix makes it cacheable.

    Seen in 3 reports
  2. Look for disagreements between what the cache sees and what the origin serves. Try adding extra path segments, delimiters or a static file extension and compare the response with and without cookies. A response that still contains private data but now carries a long-lived cache header is a strong signal.

    Seen in 3 reports
  3. Confirm caching with a cache status header or by repeating the request within the cache lifetime. Then fetch the same URL without cookies, ideally in a private window or different browser, and check whether the private data is still returned. Without this second step you cannot show impact.

    Seen in 3 reports
  4. For GraphQL, try converting a POST query that returns personal information into a GET request and appending a static-looking suffix. Check whether the CDN serves the personalised response from cache. Also test whether a user-controlled parameter in the cache key lets you force caching of a dynamic response.

    Seen in 3 reports
  5. Consider variants that bypass cache deception defences. A newer image file extension that the armour rule does not recognise, or URL-encoded path traversal that the CDN does not decode but the origin does, may still work. Test delimiters systematically by comparing responses with and without a random suffix.

    Seen in 3 reports
  6. If the victim must be signed in for their response to be cached, you need a way to make their browser request the crafted URL. Top-level navigation can send SameSite=Lax cookies. Have the victim visit an attacker page that sends the request, then retrieve the cached response yourself.

    Seen in 3 reports
  7. When you find a cached private response, identify exactly what it contains: session tokens, CSRF tokens, email addresses, billing details, API keys or profile data. Then show how an unauthenticated attacker can retrieve it. If it contains a CSRF token, consider whether it chains into a CSRF attack, but only claim what you can demonstrate.

    Seen in 3 reports
  8. Check whether the cache classifies responses by URL extension alone. If a dynamic endpoint returns private JSON but a static extension makes the cache store it, that is the bug. Also check whether the framework applies long-lived cache headers to any URL ending in a static extension even when the body is private API data.

    Seen in 2 reports
  9. Do not assume a cache HIT alone is a vulnerability. The response must contain data the victim would not want shared, and you must show it is served to an unauthenticated requester. A cached public page or a cached error page without sensitive content is not enough.

    Seen in 2 reports
  10. Test preview and raw-content endpoints separately. Preview responses cached without respecting no-cache headers, and raw endpoints that do not set cache-control headers, can leak content that later becomes private or is edited. Check whether old content is still served after a visibility change.

    Seen in 2 reports
  11. If you find a working technique, check whether the same pattern applies to other endpoints and parameters. A cache rule that matches before decoding, or a helper that compares raw URIs against fixed strings, often affects more than one path. Report the general root cause with one clear reproducible example.

    Seen in 2 reports
  12. Test whether the origin ignores extra path segments while the cache keys on the full URL. If adding an arbitrary segment still returns the same page, adding a static extension may cause the cache to store it. Repeat within the cache lifetime to confirm a hit before delivering the link to a victim.

    Seen in 1 report
  13. Check subdomains and less obvious hosts for pages that mix static and dynamic content. A crafted link that causes a signed-in user's page to be stored and served to others is the same bug even if the main site is well defended.

    Seen in 1 report
  14. Avoid reporting a cached response that contains no private data or that only affects your own session. Also check scope: a cache deception on an out-of-scope host or a third-party CDN may be rejected. Confirm the asset is in scope before spending time on exploitation.

    Seen in 1 report