A cache poisoning attack corrupts a cache — a temporary store of answers that systems reuse to go faster — so it hands out a wrong, attacker-chosen answer to everyone who asks. The two caches that matter most in cyber security are DNS resolvers (which turn website names into addresses) and web caches (which store copies of pages so sites load faster). Poison either one and large groups of users are silently redirected to fake sites — without any phishing email being sent and without the attacker touching the real website at all.
TL;DR
- Cache poisoning injects false answers into caches — DNS resolvers or web caches — so users are redirected to attacker-controlled sites.
- It is a scalability trick: poison one resolver and every device behind it inherits the lie.
- Classic forms: DNS cache poisoning, web cache poisoning via unkeyed headers, and domain fronting tricks.
- The defences are structural: DNSSEC validation, cache-randomisation, modern resolver behaviour, and treating cache warnings as alarms.
- The same infrastructure attack class as pharming — the user did everything right and still lands on a fake page.
What caching is, and why it can be poisoned
A cache exists to make repeated work cheap. A DNS resolver caches "example.com is at 93.184.216.34" so it does not ask the internet every time; a web cache stores the rendered copy of a popular page so the next visitor gets it instantly. Caches trust their sources when filling — and that trust is the attack surface. If an attacker can inject one wrong entry into a cache, every user behind that cache receives the wrong answer until the entry expires.
The poison spreads without touching any real server: the fake answer lives in the cache, not on your website, so nothing on your side looks broken — which is exactly why these attacks are hard to notice.
The main forms of cache poisoning
- DNS cache poisoning. The attacker races or tricks a resolver into caching a fake address for a real domain — yourbank.com resolving to the attacker's server for every customer of that resolver. Modern resolvers randomise ports and query IDs to make this hard, but legacy or misconfigured resolvers remain exposed, and a compromised router or hosts file produces the same outcome (the router route is the common one in small businesses — see the pharming guide).
- Web cache poisoning. A more modern form: the attacker sends a request containing a malicious value in a header the caching layer does not use to identify the page (an "unkeyed" header), but the page does use to build its response. The cache stores the poisoned response under the normal page's URL — and serves it to every subsequent visitor, complete with injected script.
- Malware-assisted poisoning. A trojan on one device rewrites local resolution — poisoning just that device's view of the internet, quietly capturing logins.
What a poisoned cache does to a business
- Customers redirected. A poisoned entry for your domain sends your customers to a pixel-perfect fake that harvests logins or payment details — and the reputation damage lands on you.
- Staff redirected. Office devices behind a poisoned resolver reach attacker servers when logging into banking, SaaS and internal portals — credentials captured on careful employees who typed the right address.
- Malware delivered. Poisoned entries for software-update domains serve trojanised downloads — the same payload pattern as malvertising, but through infrastructure rather than ads.
The Australian baseline for what follows: the ASD logged more than 84,700 cybercrime reports in 2024-25, one every six minutes, with small business averaging $56,600 per report (ASD Annual Cyber Threat Report 2024-25).
How to defend against cache poisoning
- Use validating DNS resolvers. DNSSEC-signed domains let resolvers prove answers authentic; make sure the resolvers your devices use validate.
- Force every device through approved resolvers. Blocking arbitrary outbound DNS closes the route where malware points a device at a resolver the attacker controls.
- Harden the router. Unique admin password, current firmware, remote administration disabled — router compromise is the most common poisoning route in small offices.
- Patch edge and application software. Web cache poisoning is fixed in application code; unpatched apps stay vulnerable.
- Treat certificate warnings as alarms. A fake site usually cannot present a valid certificate for your real domain — a warning before a login is a signal, never a click-through.
- Bookmark logins. Bookmarked, MFA-protected logins blunt both cache poisoning and its phishing cousins; a security gap assessment shows whether MFA actually covers every external login.
- Train the report reflex. A login page that feels off gets reported even when the address looks right — Cyber Aware's security awareness training builds exactly that habit, and human risk reporting tracks whether it is sticking.
FAQ
What is cache poisoning in simple terms? Injecting a wrong, attacker-chosen answer into a cache — DNS or web — so users are silently redirected to attacker-controlled sites until the entry expires.
Is cache poisoning the same as DNS hijacking? Related but distinct. Hijacking changes the resolver's configuration; poisoning injects a false record into the cache itself. Both redirect users; the poison is invisible in the settings.
Could our business be a victim without knowing? Yes — the poisoned entry sits on the resolver or cache, not on your systems. A customer complaint about a login page that looked odd is often the first signal.
Does HTTPS protect us? Largely, yes for the redirected domain: the fake site cannot present a valid certificate for your domain without triggering browser warnings. That is why the discipline "never proceed past a certificate warning on a login" matters so much.
How do we know if our DNS resolver validates DNSSEC? Ask your MSP or run a DNSSEC validation test against the resolver. Cloudflare, Google and Quad9 resolvers validate by default.
What is the first step for a small business? Lock outbound DNS to approved validating resolvers and change the router's admin password. Both are minutes of work and close the two most common poisoning routes.
One last thing
Check today whether your office devices can be pointed at any DNS server they like. If a laptop can query an attacker's resolver directly, every other control you have around DNS is advisory — and forcing devices through one approved resolver is a single firewall rule away.
Related guides
- What is pharming? — the infrastructure-attack family this belongs to.
- What is DNS hijacking? — the configuration-level cousin.
- What is credential harvesting? — what the fake pages are built to do.