Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-50251

CVE-2026-50251: NLnet Labs Unbound DoS Vulnerability

CVE-2026-50251 is a denial of service vulnerability in NLnet Labs Unbound that allows attackers to trigger cache flushes through malicious glue records. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-50251 Overview

CVE-2026-50251 affects NLnet Labs Unbound recursive DNS resolver up to and including version 1.25.1. The flaw allows a remote attacker to repeatedly trigger Unbound's defensive cache-clear routine by returning in-bailiwick glue records pointing to 0.0.0.0 or ::0. When the unwanted-reply-threshold option is enabled, Unbound miscounts loopback responses as spoofed replies. The attacker drives the counter to the configured threshold, forcing repeated message and rrset cache flushes without sending a single spoofed packet. The vulnerability is tracked under CWE-184: Incomplete List of Disallowed Inputs.

Critical Impact

A malicious delegation can indefinitely flush Unbound's message and rrset caches, degrading resolver performance and enabling downstream availability impact.

Affected Products

  • NLnet Labs Unbound versions up to and including 1.25.1
  • Deployments with unwanted-reply-threshold set to any value greater than zero
  • Systems where the kernel routes 0.0.0.0/::0 datagrams over loopback (e.g., Linux)

Discovery Timeline

  • 2026-07-22 - CVE-2026-50251 published to NVD
  • 2026-07-22 - Last updated in NVD database

Technical Details for CVE-2026-50251

Vulnerability Analysis

Unbound's iterator processes glue records returned by authoritative servers to shortcut delegation lookups. When an attacker-controlled delegation returns in-bailiwick glue of 0.0.0.0 or ::0, the iterator issues a DNS query to that address. On Linux and similar systems, the kernel routes the datagram over the loopback interface. Unbound's own listener then responds from 127.0.0.1.

The reply's source IP (127.0.0.1) does not match the queried address (0.0.0.0), so Unbound's spoofing defense classifies it as an unwanted reply. Each mismatch increments the internal counter. Once the counter reaches unwanted-reply-threshold, Unbound flushes the message and rrset caches as a defensive measure. The counter then resets, and the attack loops indefinitely.

Root Cause

The root cause is incomplete validation of glue record contents [CWE-184]. Unbound does not filter unspecified addresses (0.0.0.0 and ::0) before using them as upstream targets. Combined with the reply-source-matching heuristic, this creates a self-inflicted loop where legitimate loopback responses are misattributed to spoofing.

Attack Vector

An attacker who controls an authoritative name server for any zone can craft delegations whose glue records point to 0.0.0.0 or ::0. When a downstream Unbound resolver queries that zone, the iterator follows the glue, receives loopback responses, and repeatedly triggers the defensive cache flush. No spoofed packets, session hijacking, or privileged access are required. Full technical detail is available in the NLnet Labs advisory for CVE-2026-50251.

The vulnerability manifests entirely through protocol-conformant DNS responses and does not require exploit code. See the vendor advisory for reproduction steps.

Detection Methods for CVE-2026-50251

Indicators of Compromise

  • Repeated Unbound log entries indicating cache flushes triggered by unwanted-reply-threshold
  • Outbound DNS queries from the resolver to 0.0.0.0 or ::0
  • Sudden and recurring drops in Unbound cache hit ratio without a corresponding traffic spike
  • Loopback DNS traffic on port 53 originating from the resolver process itself

Detection Strategies

  • Monitor Unbound statistics output (unbound-control stats) for elevated num.query.cachedb misses and frequent msg.cache and rrset.cache size resets.
  • Alert on log messages referencing unwanted replies or defensive cache cleans.
  • Inspect authoritative responses for in-bailiwick glue records containing unspecified IPv4 or IPv6 addresses.

Monitoring Recommendations

  • Capture packet traces on the resolver's loopback interface to identify self-directed DNS queries.
  • Baseline cache size and hit ratio, then alert when either deviates sharply.
  • Aggregate Unbound logs into a central SIEM and build correlation rules keyed on repeated cache-flush events.

How to Mitigate CVE-2026-50251

Immediate Actions Required

  • Upgrade Unbound to a version above 1.25.1 once NLnet Labs publishes the fixed release referenced in the vendor advisory.
  • Audit unbound.conf for the unwanted-reply-threshold directive and review whether it is required in the current threat model.
  • Restrict outbound DNS from the resolver so that queries to 0.0.0.0 or ::0 cannot be routed.

Patch Information

NLnet Labs tracks the fix in the advisory at nlnetlabs.nl/downloads/unbound/CVE-2026-50251.txt. Administrators should apply the vendor-supplied update as soon as it is available for their distribution and rebuild any packaged versions that embed Unbound.

Workarounds

  • Disable unwanted-reply-threshold by setting its value to 0 until a patched Unbound release is deployed.
  • Add host or firewall rules that block DNS traffic destined for 0.0.0.0 and ::0 on the resolver.
  • Configure kernel routing to drop rather than loopback datagrams addressed to unspecified addresses where operationally feasible.
bash
# Configuration example: disable the vulnerable threshold in unbound.conf
server:
    unwanted-reply-threshold: 0

# Verify the running configuration
unbound-checkconf /etc/unbound/unbound.conf
unbound-control reload

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.