CVE-2026-56416: Possible heap buffer overflow when validator canonicalizes RDATA that contains domain name
In NLnet Labs Unbound up to and including version 1.25.1, when the validator builds the canonical RDATA form for an RRSIG-covered PX/RP/MINFO/SOA RRset, it computes the address of the second embedded domain name as 'datstart + dnamevalid(datstart, ...)' and passes it straight to 'querydnametolower()' without checking that a second name is actually present in the RDATA. The wire-format parser accepts multi-dname RRs whose RDATA ends after the first name, so an attacker who runs a DNSSEC-signed authoritative server can deliver a record with an absent second domain name (e.g. SOA record) and cause 'querydnametolower()' to walk label-by-label through stale bytes in the per-worker 'env->scratchbuffer', past the end of that heap allocation if 'msg-buffer-size' has been lowered from the default. This leads to heap buffer overflow and on a release build the outcome relies heavily on the contents of the buffer tail and the adjacent heap chunk.
Other sources
Possible heap buffer overflow when validator canonicalizes RDATA that contains domain name
— Microsoft
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.25.2-1 - Upgrade
Upgrade
NLnet Labs Unboundto a version that resolves this vulnerability.Fixed in 1.25.2 - Compensating control
If you cannot upgrade to Unbound 1.25.2 immediately, mitigate the risk by keeping the wire-format message buffer size at the default (avoid lowering 'msg-buffer-size'), since the overflow is triggered when 'msg-buffer-size' has been lowered from the default.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-56416?
The severity of CVE-2026-56416 is rated as medium with a score of 4.8.
What is the risk associated with CVE-2026-56416?
CVE-2026-56416 has a risk rating of 32.
How do I fix CVE-2026-56416?
To fix CVE-2026-56416, upgrade to the latest version of NLnet Labs Unbound beyond version 1.25.1.
What type of vulnerability is CVE-2026-56416?
CVE-2026-56416 is a possible heap buffer overflow vulnerability.
Which software is affected by CVE-2026-56416?
CVE-2026-56416 affects NLnet Labs Unbound versions up to and including 1.25.1.