Internal DNS Cache Poisoning That Redirected API Traffic
A misconfigured internal DNS resolver accepted forged responses, causing microservice-to-microservice calls to route to a stale IP for 2 hours.
Overview
An internal DNS resolver left without DNSSEC validation cached a forged record for payments-api.internal, and every service sent payments traffic to a dead IP for 2 hours.
What happened
The shared resolver was a self-hosted BIND instance on EC2. DNSSEC, the extension that lets a resolver check that a DNS answer was signed by the zone that owns it, was turned off during an upgrade and never turned back on. The incident then unfolded in six steps.
- During an upgrade, DNSSEC validation was disabled 'temporarily'.
- Nobody re-enabled it.
- During a network hiccup, BIND sent its queries to a rogue resolver.
- With validation off, BIND accepted a forged A record for payments-api.internal, with a TTL of 7,200 seconds.
- The team identified the rogue resolver and blocked it, but the stale record stayed in the cache for 2 more hours.
- The team cleared it with rndc flush and repointed the A record.
Key concepts
- DNS cache poisoning
- DNSSEC
- DNS TTL
- Service discovery with health checks
Interview questions
- How do you design internal service-to-service DNS to minimize the impact of DNS failures or poisoning?
Sign up free to read the full topic
More War Stories topics
- BGP Route Leak That Rerouted Traffic Through an Unexpected AS
- Blue-Green Deployment That Resulted in Split-Brain Sessions
- Cache Stampede on a Flash-Sale Product Page
- Connection Pool Exhaustion That Brought Down 12 Microservices
- DynamoDB Hot Partition That Throttled a Flash Sale
- Failover to a Lagging Replica Lost 4 Minutes of Orders
- Malicious npm Package Exfiltrated Environment Variables at Build Time
- N+1 Query Pattern That Collapsed Under Load
- NAT Gateway Port Exhaustion Under Bursty Lambda Traffic
- Node.js Memory Leak That Required Daily Restarts
- Public S3 Bucket Exposed Customer PII for 8 Months
- Silent Data Corruption from an Off-By-One Migration
Start free on Cariara · Coding problems · System design studio