Skip to main content


Home Web cache poisoning

Web cache poisoning

Web cache poisoning definition

Web cache poisoning refers to a security vulnerability during which an attacker manipulates the content of a web cache to serve malware or fake information to unsuspecting users. Web caches store copies of web pages to improve performance by serving cached content instead of fetching it from the original server. However, if a cache is poisoned, the attacker can show the users whatever content they want, making it a perfect tool for advanced phishing attacks and malware distribution.

Web cache poisoning is a rather dangerous attack for a couple of reasons. First, it’s very efficient — it allows attackers to target a large number of users simultaneously by compromising a single cache. And it can also be challenging to identify since it exploits vulnerabilities in caching systems rather than directly targeting the application itself.

See also: cache server, DNS cache

Preventing web cache poisoning

There are some measures you can take to ensure your web application security:

  • Validate inputs. Check and validate data before storing it in the cache to ensure it's safe.
  • Control caching. Use specific instructions to control how caching is done, so malicious content doesn't get stored.
  • Separate cache content. Keep different types of content in separate cache areas to minimize the impact of an attack.
  • Secure content policy. Set rules to prevent unauthorized content from being injected into the cache.
  • Perform security audits. Regularly review and test the caching system for vulnerabilities.
  • Keep software updated. Install the latest security patches and updates for the caching software.
  • Monitor for suspicious activity. Keep an eye out for any unusual or malicious behavior.