CVE-2020-12662

7.5 HIGH

📋 TL;DR

CVE-2020-12662 is a DNS amplification vulnerability in Unbound DNS resolver where attackers can trigger random subdomain queries via malicious NS records, causing denial of service through resource exhaustion. This affects any system running vulnerable Unbound versions as a DNS resolver. The attack exploits insufficient control over network message volume.

💻 Affected Systems

Products:
  • Unbound DNS resolver
Versions: All versions before 1.10.1
Operating Systems: Linux, BSD, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems where Unbound is configured as a recursive resolver. Forwarding-only configurations may be less vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete DNS resolver unavailability due to resource exhaustion, disrupting all DNS resolution for dependent systems and potentially causing cascading network failures.

🟠

Likely Case

Degraded DNS performance, increased latency, and intermittent service disruptions affecting applications relying on DNS resolution.

🟢

If Mitigated

Minimal impact with proper rate limiting, query validation, and updated software.

🌐 Internet-Facing: HIGH - DNS resolvers are typically internet-facing and directly exposed to malicious queries.
🏢 Internal Only: MEDIUM - Internal DNS resolvers could be targeted through compromised internal systems or lateral movement.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Attack requires sending specially crafted DNS queries with malicious NS records. The nxnsattack.com website demonstrates the technique.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.10.1 and later

Vendor Advisory: https://nlnetlabs.nl/projects/unbound/security-advisories/

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Stop Unbound service. 3. Update to Unbound 1.10.1 or later via package manager or source compilation. 4. Restart Unbound service. 5. Verify service is running and resolving correctly.

🔧 Temporary Workarounds

Rate limiting configuration

linux

Configure aggressive rate limiting to reduce impact of amplification attacks

Add to unbound.conf: server: ratelimit: 1000
Add to unbound.conf: server: ratelimit-size: 4m

Query validation hardening

linux

Configure stricter validation of incoming DNS queries

Add to unbound.conf: server: val-permissive-mode: no
Add to unbound.conf: server: val-clean-additional: yes

🧯 If You Can't Patch

  • Implement network-level rate limiting using firewall rules to limit DNS query volume
  • Deploy DNS query filtering/proxying solution in front of vulnerable Unbound instances

🔍 How to Verify

Check if Vulnerable:

Check Unbound version with: unbound -V | grep version

Check Version:

unbound -V

Verify Fix Applied:

Verify version is 1.10.1 or higher: unbound -V | grep 'version 1\.1[0-9]\|version [2-9]'

📡 Detection & Monitoring

Log Indicators:

  • Unusual spike in DNS queries
  • Multiple queries for random subdomains
  • High CPU/memory usage in Unbound logs

Network Indicators:

  • Abnormal DNS query patterns with random subdomains
  • DNS amplification traffic from internal resolvers

SIEM Query:

source="unbound.log" AND ("query" AND "random" OR "NXNS" OR "amplification")

🔗 References

📤 Share & Export