Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
DNS cache poisoning is an attack that plants forged records in a DNS resolver’s cache, so every user relying on that resolver is silently sent to an attacker-controlled address instead of the real site.

What Is DNS Cache Poisoning?
DNS cache poisoning, also called DNS spoofing, is an attack in which forged answers are inserted into the cache of a DNS resolver. Once the false record is cached, every client that asks that resolver for the affected domain receives the attacker’s IP address until the record expires. The user types the correct name, sees the correct name in the address bar, and still ends up on the wrong server.
Because one resolver may serve an entire office, ISP region, or cloud tenancy, a single successful poisoning can affect thousands of people at once.
Classic DNS runs over UDP, which has no handshake. When a recursive resolver sends a query to an authoritative server, it accepts the first response that matches a few fields: the question, the source and destination addresses, a 16-bit transaction ID, and the UDP source port the query came from. An attacker who can trigger a lookup and then flood the resolver with forged responses, guessing those values before the genuine answer arrives, can get a fake record accepted.
In the early 2000s many resolvers used a fixed source port, leaving only 65,536 possible transaction IDs to guess. That made the race winnable.
In 2008 security researcher Dan Kaminsky showed that the problem was far worse than anyone had assumed. Instead of poisoning one record and waiting for it to expire, an attacker could query random, non-existent subdomains—a1.example.com, a2.example.com, and so on—and include a forged authority section in each spoofed reply, claiming that the attacker’s server was authoritative for the whole domain. Each attempt was a fresh race, so success became a matter of minutes. The disclosure led to an unusually large coordinated patch across DNS vendors that summer, introducing source port randomisation as standard.
Randomised ports raised the bar but did not end the problem. In 2020 researchers presented SAD DNS, which used a side channel in ICMP rate limiting to infer the open source port, reducing the guessing space back to the transaction ID alone. Operating system patches followed, but the research was a reminder that guessing-based defences only buy time.
| Technique | What is attacked | Example |
|---|---|---|
| Cache poisoning | A resolver’s cache, through forged responses | Kaminsky-style attacks on unpatched resolvers |
| DNS hijacking | Registrar accounts, authoritative servers, or client settings | The Sea Turtle campaign reported in 2019, which altered records via compromised registrars |
| Routing attacks | Internet routing to the DNS provider | The April 2018 BGP hijack of Amazon Route 53 addresses used to steal cryptocurrency from MyEtherWallet users |
| Local spoofing | Name resolution on the same LAN | LLMNR and NBT-NS poisoning with tools such as Responder |
The outcomes look similar to the victim, but the defences differ, so it helps to know which one you are facing.
Redirecting a domain lets an attacker serve convincing phishing pages, capture credentials, deliver malware through fake software updates, or intercept email by poisoning MX records. HTTPS limits the damage, since the attacker usually cannot present a valid certificate for the real domain, but users who click through certificate warnings, or services that do not validate certificates properly, remain exposed.
UK public sector bodies can use the NCSC’s Protective DNS service, which filters known malicious domains at the resolver. Private organisations can apply the same idea with commercial protective DNS.
Log resolver queries and answers centrally and compare resolutions of key domains against external references. Alerts worth writing include a sudden change of IP for a high-value domain, unusually short TTLs, bursts of responses with mismatched transaction IDs, and spikes of queries for random subdomains of one zone. Our network security services include reviews of DNS architecture and resolver configuration against these attacks.
It reduces the impact considerably. Even if DNS sends you to the wrong server, the attacker normally cannot present a trusted certificate for the genuine domain, so the browser shows a warning. The protection fails if users click through warnings, if an application does not validate certificates, or if the attacker can obtain a certificate by other means, so DNSSEC and resolver hardening remain important.
No. DNSSEC protects the integrity of answers only when the zone is signed and the resolver validates signatures, and many domains are still unsigned. It also does nothing against a compromised registrar account, which can change records and keys legitimately. Combine DNSSEC with patched, hardened resolvers, registrar MFA and locks, and monitoring of how your important domains resolve.
Look for a familiar domain suddenly resolving to an unexpected address, especially one outside the owner’s usual hosting provider. Compare answers from your resolver with trusted public resolvers, inspect cached TTL values, and review resolver logs for floods of responses or random-subdomain queries. Flushing the cache restores correct answers temporarily, but you should still find and fix the weakness.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.