Explore our new Cybersecurity Terms Glossary, explained by our experts.

View the Glossary View the Glossary
PRIVIA

Cybersecurity Terms Glossary

What Is Web Cache Poisoning?

Web cache poisoning stores a harmful response in a shared cache so that it is served to every subsequent visitor, turning a single crafted request into a mass attack.

Illustration for the cybersecurity term Web Cache Poisoning
Home / Blog / Cybersecurity Terms / What Is Web Cache Poisoning?
17 November 2026

What Is Web Cache Poisoning?

What Is Web Cache Poisoning?

Caches exist to serve one stored response to many people. Web cache poisoning abuses exactly that property: an attacker sends a request that causes a harmful response to be stored, and the cache then delivers it to everyone who asks for the same resource. One request becomes an attack on every visitor until the entry expires, and the victims never interact with the attacker at all.

Cache Keys and Unkeyed Inputs

A cache decides whether a stored response may be reused by comparing a cache key, usually built from the host, the path, and the query string. Anything in the request that is not part of that key, but which still influences the response, is an unkeyed input, and that gap is the whole vulnerability.

A page that generates an absolute URL from the X-Forwarded-Host header is the classic example. The header is not in the cache key, so a request carrying an attacker’s domain produces a response containing a script tag pointing at that domain. The cache stores it under the ordinary key for the page, and every subsequent visitor loads the attacker’s script. James Kettle set out the technique in “Practical Web Cache Poisoning” at Black Hat USA in 2018 and extended it in “Web Cache Entanglement” in 2020, which showed how keys are normalised and how that normalisation can be exploited.

Common unkeyed inputs include X-Forwarded-Host, X-Forwarded-Scheme, X-Original-URL, X-Rewrite-URL, the Accept-Language and User-Agent headers where they alter content, and cookies the cache has been configured to ignore. Burp Suite’s Param Miner extension exists largely to discover them.

Fat GET and Parameter Cloaking

Some caches key on the path and query string while the application also reads a body from a GET request, or parses a parameter delimiter that the cache treats differently, such as a semicolon. Both produce a request that looks identical to the cache and different to the application. Parameter cloaking variants also exploit disagreement about which of two duplicate parameters wins.

Cache Deception, the Mirror Image

Web cache deception reverses the direction. Instead of storing a malicious response for a normal URL, the attacker persuades the cache to store a personal response under a URL that looks static. A link to /account/profile.css may be routed by the application to the profile page, while the cache sees a .css extension and stores the result as a static asset. The victim clicks the link, their profile is cached, and the attacker then requests the same URL and receives their data. The defect is a disagreement between the cache’s rules and the application’s routing, rather than an injection.

What Gets Delivered

A poisoned entry can carry injected script, which turns a reflected cross-site scripting issue that required a victim to click a crafted link into one that needs no interaction at all. It can carry a redirect to an attacker-controlled site, a broken response that denies service to a resource, or content that leaks internal hostnames and infrastructure detail. HTTP request smuggling is a frequent partner, because a desync lets an attacker place a response in the queue for an arbitrary URL.

Preventing It

  1. Stop unkeyed inputs influencing responses. If a header changes what is returned, either include it in the cache key or stop reading it. Generate absolute URLs from configuration rather than from request headers.
  2. Disable caching for anything user-specific. Responses that vary by session must carry Cache-Control: no-store, and the cache should be configured never to store a response to a request carrying authentication.
  3. Decide cacheability by content type and route, not by file extension, which is what cache deception exploits.
  4. Use Vary correctly where a header legitimately changes a response, remembering that an over-broad Vary destroys the hit rate.
  5. Normalise requests at the edge, stripping unexpected headers before they reach the origin.
  6. Keep cache configuration under review. CDN rules accumulate over years, and a rule added to fix a performance problem in 2019 is a common root cause.

Testing Safely

Probing for this on a live service is genuinely risky, because a successful poison affects real users. Work against a staging environment with the same cache configuration, add a unique cache-buster parameter to every probe so a poisoned entry cannot be served to anyone else, and verify the origin’s behaviour separately from the cache’s. Our web application security testing includes cache behaviour analysis on that basis, with the scope and timing agreed in advance.

FAQ – Frequently Asked Questions

Who Is Affected by a Poisoned Cache Entry?

Everyone who requests the affected resource while the entry remains stored, which on a busy site can be thousands of people within minutes. This is what separates cache poisoning from reflected attacks: the victim does not click a crafted link or interact with the attacker in any way. They simply visit the site normally and receive the stored malicious response.

How Is Cache Deception Different from Cache Poisoning?

Poisoning stores an attacker-controlled response under a normal URL, so everyone receives harmful content. Deception stores a victim’s personal response under a URL the attacker can request, so the attacker receives private data. Poisoning pushes content outwards to many users; deception pulls one user’s content into a location the attacker can read.

How Do We Find Unkeyed Inputs?

Add a cache-buster parameter so your probes cannot affect real traffic, then send candidate headers one at a time with a distinctive value and check whether it appears in the response. Burp Suite’s Param Miner extension automates the guessing against a large wordlist. Inspect cache status headers to confirm whether each response was stored or served fresh.

Is This a CDN Problem or an Application Problem?

It is a disagreement between the two, so it must be fixed on both sides. The application should not let headers outside the cache key influence what it returns, and should mark user-specific responses as uncacheable. The cache should key on everything that matters and decide cacheability by route and content type rather than by file extension.

Related Terms

You May Be Interested In These

What Is DNS and How Does It Work?

Cybersecurity Terms

17 November 2026

What Is DNS and How Does It Work?

Read More
What Is the Device Code Flow?

Cybersecurity Terms

17 November 2026

What Is the Device Code Flow?

Read More
What Is Alert Enrichment Automation?

Cybersecurity Terms

17 November 2026

What Is Alert Enrichment Automation?

Read More