Skip to content

Reading list

Learn Cache bugs from real reports

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.

12 reports, easiest first.

  1. Caching Trouble: The Public Cache That Leaked Private User Data

    Beginner

    A personalised API endpoint was served with a public cache header, so its JSON response containing private user data was stored and later returned to unauthenticated requests. An attacker could retrieve other users' cached dashboard details, including email, payment and location information.

    A web cache is a shared storage that saves responses to speed up later requests. Here the server told the cache that a page containing private account details was public, so anyone asking for the same address could receive someone else's saved data without logging in.

    The lesson. The endpoint returned personalised data with a Cache-Control header of public, max-age=86400 and lacked a Vary header, so shared caches stored and served the response to other users.

  2. PURGE is not authenticated

    Yelp Beginner

    The caching layer accepted unauthenticated PURGE requests, allowing anyone to invalidate cached resources. An attacker could repeatedly purge assets, forcing the origin to serve them again and increasing bandwidth costs.

    A cache stores copies of files so they load faster. A PURGE request tells the cache to throw away its copy. Here, anyone could send that request without logging in, so an attacker could keep emptying the cache and make the server work harder.

    The lesson. Likely the caching layer (Varnish) was configured to accept PURGE requests from any client without authentication or IP restriction.

  3. Web Cache Deception : Comment j’ai volé la clé API d’un utilisateur avec Burp Suite

    Beginner

    The web server ignored extra path segments and served the private account page, while the CDN cache treated the URL as a static file and stored the response publicly. An attacker could make a victim visit a crafted URL and then read the victim's cached private page, including their API key.

    A cache is a storage layer that keeps copies of web pages to serve them faster. Here the server and the cache disagreed about what a URL meant: the server returned the private account page, but the cache saw a file ending in .js and saved that private page for anyone to read. The attacker tricked the victim into loading the URL, then fetched the same URL to see the victim's private data.

    The lesson. Likely the cache keyed on the full URL including the static-looking extension, while the origin server ignored the extra path segment and returned the private page, so the private response was cached publicly.

  4. $7,000 for Poisoning a Cache: Turning One Request Into Stored XSS

    Intermediate

    The origin server trusted the X-Forwarded-Host header when generating canonical and Open Graph tags, reflecting it without proper encoding, while the CDN cache key ignored that header. An attacker could send one request to poison the cache, causing all subsequent visitors to an affected URL to receive and execute attacker-controlled JavaScript.

    A cache is a copy of a web page kept so it can be served quickly to many people. The site built its page using a header that visitors can set, but the cache decided which stored page to reuse without looking at that header. So one malicious request could replace the stored page for everyone else, and the injected script would run in their browsers.

    The lesson. The origin server trusted the client-supplied X-Forwarded-Host header when generating HTML without sufficient output encoding, and the CDN cache key excluded that header, so a single poisoned response was cached and served to all visitors.

  5. Practical Web Cache Poisoning

    Intermediate

    The paper demonstrates that web caches can be poisoned by sending requests with unkeyed HTTP headers that influence the response, causing the harmful response to be cached and served to other users. An attacker could thereby deliver exploits such as cross-site scripting to anyone visiting the affected page.

    A web cache is a server that stores copies of web pages so they load faster for everyone. If a website builds a page using information from a request header that the cache does not consider when deciding which stored copy to serve, an attacker can make the cache store a malicious version. That malicious copy is then shown to other visitors.

    The lesson. Likely the cache key does not include all request inputs that affect the response, so an attacker-controlled header can alter the cached response served to other users.

  6. GHSL-2024-226_GHSL-2024-227: Poisoned Pipeline Execution (PPE) in Cilium

    GitHub Security Lab Intermediate

    The Cilium push-chart-ci workflow checks out and executes untrusted code from a pull request, allowing an attacker to exfiltrate secrets and poison the default branch cache. This could lead to privilege escalation in other workflows.

    A GitHub Actions workflow automatically runs code from a pull request without checking if it is safe. An attacker can change a script in their pull request so that when the workflow runs, it steals secret passwords and also writes malicious files to a shared cache that other workflows use.

  7. Cracking SameSite for a $2,000 Web Cache Deception

    Intermediate

    The homepage was cached by a proxy and included the authenticated user's JWT in its JavaScript, so an attacker could trick a victim into visiting a unique URL and then retrieve the cached page to steal the token. The attacker bypassed SameSite=Lax cookie restrictions by forcing a top-level navigation, allowing full account takeover.

    A web cache is a temporary storage that saves copies of web pages to serve them faster. Here, the homepage was saved with the user's secret login token (JWT) inside it, so anyone who could access that saved copy could log in as that user. The attacker made victims visit a special link that caused their page to be saved, then the attacker visited the same link to read the saved page and steal the token.

    The lesson. Likely the application cached a response that contained user-specific sensitive data (the JWT) without marking it as private, and the cache key did not account for the user's session.

  8. How I Took a Website Completely Offline with a Funky Cache Poison

    Intermediate

    A cache poisoning vulnerability allowed an attacker to make the entire website unavailable by sending a special header that caused the server to return an empty response, which the CDN then cached for all users. The attacker could poison the cache for all possible cookie combinations, resulting in a full denial of service.

    A cache is like a storage room that keeps copies of web pages so they load faster for everyone. If an attacker can trick the cache into storing a broken or empty page, then everyone who visits the site gets that broken page instead of the real one. This report shows how a small header trick combined with predictable cookies let an attacker fill the cache with empty pages, taking the whole site offline.

    The lesson. Likely the CDN cached responses based on a small set of predictable cookie values, and the server returned an empty response when a specific header was present, allowing an attacker to poison all cache variants.

  9. Bypass of Cloudflare's Cache Keys and WAF via header overflow

    Cloudflare Public Bug Bounty Intermediate

    Cloudflare's Front Line stopped evaluating cache keys and WAF rules once a request carried more than 94 headers, so an attacker could append a keyed header after the overflow to poison the cache or slip malicious content past the WAF. This could lead to cache poisoning denial of service and stored XSS.

    A web cache stores copies of pages so they load faster, and a cache key is the set of request details (like certain headers) used to decide which stored copy to serve. Cloudflare also has a firewall (WAF) that inspects requests and blocks malicious ones. The report says that if a request had more than 94 headers, Cloudflare stopped looking at the extra headers for both caching and firewall decisions, so an attacker could hide a harmful header after the cutoff and get bad content cached or a malicious request through.

    The lesson. Likely the HTTP header parser in Cloudflare's Front Line truncated requests at around 100 headers (including internal ones), so rulesets and cache-key evaluation never saw headers beyond that limit.

  10. Shopify.com Web Cache Deception vulnerability leads to personal information and CSRF tokens leakage

    Shopify Intermediate $800

    Shopify.com was vulnerable to web cache deception, where an attacker could trick a cache into storing authenticated user pages by appending a .css extension to a URL. This allowed the attacker to retrieve personal information and CSRF tokens from the cached page.

    Web cache deception is when a website's cache mistakenly stores a private page because the URL looks like a static file (like an image or stylesheet). An attacker can then visit that same URL and see the private information. Here, adding .css to a profile URL made the cache store the page, leaking names, emails, and security tokens.

    The lesson. The cache server classified responses as cacheable based solely on the URL extension (.css) without checking the actual content type, so it cached dynamic pages containing private data.

  11. Bypass of request line length limit to DoS via cache poisoning

    Greenhouse.io Intermediate

    The fix for a previous cache-poisoning denial-of-service bug limited the request URI to 1024 characters after decoding, but multi-byte UTF-8 characters expand to up to 12 URL-encoded bytes each, allowing an attacker to bypass the limit and poison the cache again. This causes the generated JavaScript file to contain an overlong board URI, leading to connection errors and a denial of service for embedded job boards.

    A website was caching a generated JavaScript file that included a value taken from the request URL. An attacker could make that value very long, so the server would later fail to handle requests for that file, breaking the embedded job board for other users. The first attempt to fix this limited the URL length, but the attacker found that certain characters take more space when encoded, so they could still make the value too long.

    The lesson. Likely the length check was applied to the decoded character count rather than the encoded byte length, and the untrusted input was still reflected into the cached file.

  12. One .svg and a CDN: How a File Extension Leaked Strangers' PII

    Intermediate

    A profile API returned private user data with a long-lived cache header when a static file extension was appended to the URL, allowing a CDN to cache and serve that data to unauthenticated users. An attacker could send a victim a link; once clicked while logged in, the victim's PII became publicly retrievable from the cache.

    A website's cache is like a shared noticeboard that stores copies of pages to load them faster. The site normally told the cache not to store private profile pages, but adding '.svg' to the end of the address made the site mistakenly tell the cache it was a harmless image that could be stored for a year. Anyone who then visited that same address could read the stored private details without logging in.

    The lesson. Likely the framework's static-asset handling applied a long-lived cache header to any URL ending in a static extension, even when the response body was private API data, and the CDN cached it accordingly.