Winning the race with a forged answer
Attacker
races the real response
Forged answer
arrives first
Resolver cache
poisoned for everyone sharing it
DNS Cache Poisoning vs. Spoofing: Risks and Prevention
DNS was originally designed without any way to verify that a response actually came from the nameserver it claimed to come from. That gap enables spoofing: an attacker positioned to intercept or race a DNS query can send back a forged response pointing the victim at an address of the attacker's choosing -- often used to redirect traffic toward a malicious server impersonating a legitimate site.
Cache poisoning: the same idea, at scale
Cache poisoning takes the same forged-response idea and targets a shared resolver rather than a single victim. If an attacker can slip a forged answer into a widely used recursive resolver's cache, every subsequent user of that resolver gets the poisoned answer until it expires -- turning a single successful forgery into an attack against everyone who happens to share that resolver, without needing to intercept each of their individual queries.
How modern DNS defends against it
| Defense | Protects against | Universally deployed? |
|---|---|---|
| Source port / query ID randomization | Guessing a forged response before the real one arrives | Yes, standard since 2008 |
| DNSSEC | A forged response impersonating the authoritative server | No -- partial adoption across the internet |
| DNS-over-HTTPS / DNS-over-TLS | On-path interception of the query itself | Growing, but not the default everywhere |
None of these defenses are universally deployed -- DNSSEC adoption in particular remains partial across the domains that make up the internet. Using a well-run, security-conscious public resolver, and treating an unexpected or suspicious resolution result as worth double-checking from a second, independent resolver, remains a reasonable practical precaution even where DNSSEC isn't in play.
The bug that changed how seriously this is taken
Cache poisoning stopped being a theoretical concern in 2008, when security researcher Dan Kaminsky disclosed a fundamental flaw affecting nearly every DNS resolver in use at the time: the space of possible transaction IDs and source ports an attacker had to guess was small enough to brute-force in seconds over a fast connection, letting an attacker poison a resolver's cache for an entire domain, not just one record. The disclosure led to an unusually coordinated, simultaneous patch release across every major DNS software vendor -- source port randomization became standard almost overnight -- and is a large part of why the specific defenses listed above exist in their current form.
Why DNSSEC adoption still lags despite the fix being twenty years old
DNSSEC solves the underlying trust problem far more completely than port randomization alone -- it's cryptographic proof, not just a harder guessing game. Its slow rollout has more to do with operational complexity than doubt about its value: signing a zone correctly, rotating keys on schedule without breaking validation, and keeping the whole chain of trust intact from the root down to a specific domain is meaningfully harder to get right than adding an unsigned A record. A single mistake in that process produces the exact SERVFAIL failure mode covered elsewhere in this series, which is itself a deterrent for smaller domain operators without dedicated DNS expertise on staff. The gap between "solved in theory" and "deployed everywhere in practice" is common across security infrastructure, and DNSSEC is a clear example of it.
Need to check a domain's public DNS addresses? Use the Domain IP Lookup tool.
Related reading
Public vs. private address space
Public IP
192.0.2.10
globally unique -- routable from anywhere
Private ranges
not routable on the public internet
Why Private IP Addresses Are Not Routable on the Public Internet
10.0.0.0/8, 192.168.0.0/16, and their neighbors exist specifically so they're never globally unique -- here's why that matters for DNS.
SSRF turns a server into an unwilling proxy
Attacker
crafts a request URL
Vulnerable server
fetches it, SSRF-tricked
169.254.169.254
the metadata endpoint
Credentials
returned to the attacker
Cloud Metadata Endpoints: Security Risks and Protection
A single, unroutable-looking IP address gives cloud instances access to credentials and configuration -- and it's a common SSRF target.
The same address, four different ways to write it
SSRF and DNS: How Server-Side Request Forgery Exploits DNS
Server-side request forgery often starts with nothing more than a domain name your server was tricked into resolving and requesting.