Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated
Cache poisoning injects false content into a cache so that subsequent requests receive that false content rather than a genuine response. A cache stores a fetched response locally or on an intermediate device and reuses it for later requests to the same address. IETF's RFC 9111 notes that when malicious content enters a cache, the attacker's influence can extend to multiple users.
How does cache poisoning work?
Think of a posted notice at a store entrance being replaced with a fake one. Every customer reads the fake notice because they all look at the same copy. A cache can be manipulated in the same way.
RFC 9111 explains that the attack succeeds when the attacker uses an implementation flaw or elevated privilege to place a response into the cache. Shared caches — those used by more than one person — are particularly effective targets. OWASP explains that when false content is stored in a shared web cache, it is served to every user of that cache until the stored entry is replaced. When the affected cache is in a single user's browser, the harm is limited to that one person.
CAPEC explains that public caches such as DNS and ARP are also potential targets, not only web caches. For a detailed explanation of the web-specific attack, see the cache poisoning vulnerability page.
Why does cache poisoning matter?
Once false content is stored, it is served again on every request to the same address until the cache is refreshed. In a shared cache, one injection reaches many users. CAPEC notes that the false content can be used to steer users toward sites that install malware.
OWASP's Web Cache Security Cheat Sheet explains that caches are attractive targets because a single stored entry can affect many users. As a defensive design principle, each route should have an explicit cache policy, and responses that contain personal data or change per logged-in user should not be stored in a shared cache. Inputs that could change a response must either be included in the cache key or not accepted at all. After a configuration change, any entries stored under the old settings should be cleared.
The free URL check shows whether your site uses caching or delivery infrastructure from the outside. To review your cache configuration, contact us.
Related terms
- HTTP header injection: a technique that inserts unauthorized content into the metadata of an HTTP response.
- DNS spoofing: a technique that sends users to a fake site by injecting false DNS address records.
Frequently asked questions
Does using a CDN increase the risk of cache poisoning?
Using a CDN is not itself the problem. OWASP explains that what determines safety is how you design which responses get cached and what key is used to tell them apart.
Can DNS caches be poisoned in the same way?
Yes. CAPEC explains that public caches such as DNS and ARP can also receive injected false content, not only browser caches.
Next step
A detailed explanation of the web-specific attack is on the cache poisoning vulnerability page. The free URL check shows whether caching or delivery infrastructure is visible from outside your site. To review your cache configuration, contact us.
Frequently asked questions
Does using a CDN increase the risk of cache poisoning?
Using a CDN is not itself the problem. OWASP explains that what determines safety is how you design which responses get cached and what key is used to tell them apart.
Can DNS caches be poisoned in the same way?
Yes. CAPEC explains that public caches such as DNS and ARP can also receive injected false content, not only browser caches.