{"id":"CVE-2026-56416","state":"PUBLISHED","title":"Possible heap buffer overflow when validator canonicalizes RDATA that contains domain name","description":"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 + dname_valid(datstart, ...)' and passes it straight to 'query_dname_tolower()' 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 'query_dname_tolower()' to walk label-by-label through stale bytes in the per-worker 'env->scratch_buffer', 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.","publishedAt":"2026-07-22T13:10:24.023Z","updatedAt":"2026-07-22T14:00:45.744Z","severity":{"score":4.8,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L","source":"NLnet Labs"},"assigner":"NLnet Labs","products":["NLnet Labs Unbound"],"affected":[{"vendor":"NLnet Labs","product":"Unbound","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.25.2","versionType":"semver"}]}],"references":["https://www.nlnetlabs.nl/downloads/unbound/CVE-2026-56416.txt"],"weaknesses":["CWE-354"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/56xxx/CVE-2026-56416.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-56416","state":"PUBLISHED","datePublished":"2026-07-22T13:10:24.023Z","dateUpdated":"2026-07-22T14:00:45.744Z","assignerShortName":"NLnet Labs","assignerOrgId":"206fc3a0-e175-490b-9eaa-a5738056c9f6","dateReserved":"2026-06-22T12:27:22.810Z"},"containers":{"cna":{"title":"Possible heap buffer overflow when validator canonicalizes RDATA that contains domain name","descriptions":[{"lang":"en","value":"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 + dname_valid(datstart, ...)' and passes it straight to 'query_dname_tolower()' 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 'query_dname_tolower()' to walk label-by-label through stale bytes in the per-worker 'env->scratch_buffer', 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."}],"affected":[{"vendor":"NLnet Labs","product":"Unbound","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"1.25.2","versionType":"semver"}]}],"references":[{"url":"https://www.nlnetlabs.nl/downloads/unbound/CVE-2026-56416.txt","tags":["vendor-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","baseScore":4.8,"baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-354","lang":"en","description":"CWE-354: Improper Validation of Integrity Check Value","type":"CWE"}]}],"providerMetadata":{"shortName":"NLnet Labs","orgId":"206fc3a0-e175-490b-9eaa-a5738056c9f6","dateUpdated":"2026-07-22T13:10:24.023Z"},"datePublic":"2026-07-22T00:00:00.000Z","solutions":[{"lang":"en","value":"This issue is fixed starting with version 1.25.2"}],"timeline":[{"time":"2026-05-05T00:00:00.000Z","lang":"en","value":"Issue reported by Qifan Zhang"},{"time":"2026-05-29T00:00:00.000Z","lang":"en","value":"NLnet Labs shares patch"},{"time":"2026-06-03T00:00:00.000Z","lang":"en","value":"Qifan Zhang verifies patch"},{"time":"2026-07-22T00:00:00.000Z","lang":"en","value":"Fixes released with version 1.25.2"}],"credits":[{"lang":"en","value":"Qifan Zhang (Palo Alto Networks)","type":"finder"}],"x_generator":{"engine":"cvelib 1.8.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-22T13:59:48.705600Z","id":"CVE-2026-56416","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-22T14:00:45.744Z"}}]}}}