← Vulnerability feed

Vulnerability record · CVE-2026-40691 · published 22 July 2026

CVE-2026-40691: Nlnetlabs unbound heap-based buffer overflow vulnerability

Nlnetlabs · Unbound

In Unbound 1.9.0 up to and including 1.25.1, when a DNSCrypt query is received over TCP, the routine that encrypts the reply in place fails to bound the reply length against the destination buffer size. The size clamp that protects the UDP path is not applied on the TCP path, so a reply larger than 65504 bytes is shifted forward by 48 bytes inside a buffer of capacity equal to 'msg-buffer-size', writing past the end of the heap allocation. A single malicious encrypted query crashes the resolver and lead to denial of service. This vulnerability needs Unbound to be compiled with DNSCrypt support ('--enable-dnscrypt') and the 'dnscrypt:' clause to be configured and enabled for the listening interfaces.

7.5 CVSS 3.1 High EPSS 0.46% · top 62.6% CWE-122 · Heap-based buffer overflowCWE-787 · Out-of-bounds write
7.5CVSS 3.1 base score
0.46%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
1References
24 Jul 2026Last modified by NVD

Description

In Unbound 1.9.0 up to and including 1.25.1, when a DNSCrypt query is received over TCP, the routine that encrypts the reply in place fails to bound the reply length against the destination buffer size. The size clamp that protects the UDP path is not applied on the TCP path, so a reply larger than 65504 bytes is shifted forward by 48 bytes inside a buffer of capacity equal to 'msg-buffer-size', writing past the end of the heap allocation. A single malicious encrypted query crashes the resolver and lead to denial of service. This vulnerability needs Unbound to be compiled with DNSCrypt support ('--enable-dnscrypt') and the 'dnscrypt:' clause to be configured and enabled for the listening interfaces.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2026-40691 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

9.8CVE-2019-25032Nlnetlabs unbound integer overflow vulnerabilityUnbound before 1.9.5 allows an integer overflow in the regional allocator via regional_alloc. NOTE: The vendor disputes that this is a vulnerability.…EPSS 2.0%9.8CVE-2019-25033Nlnetlabs unbound integer overflow vulnerabilityUnbound before 1.9.5 allows an integer overflow in the regional allocator via the ALIGN_UP macro. NOTE: The vendor disputes that this is a vulnerabil…EPSS 1.8%9.8CVE-2019-25034Nlnetlabs unbound integer overflow vulnerabilityUnbound before 1.9.5 allows an integer overflow in sldns_str2wire_dname_buf_origin, leading to an out-of-bounds write. NOTE: The vendor disputes that…EPSS 2.0%9.8CVE-2019-25035Nlnetlabs unbound out-of-bounds write vulnerabilityUnbound before 1.9.5 allows an out-of-bounds write in sldns_bget_token_par. NOTE: The vendor disputes that this is a vulnerability. Although the code…EPSS 2.0%9.8CVE-2019-25038Nlnetlabs unbound integer overflow vulnerabilityUnbound before 1.9.5 allows an integer overflow in a size calculation in dnscrypt/dnscrypt.c. NOTE: The vendor disputes that this is a vulnerability.…EPSS 2.0%9.8CVE-2019-25039Nlnetlabs unbound integer overflow vulnerabilityUnbound before 1.9.5 allows an integer overflow in a size calculation in respip/respip.c. NOTE: The vendor disputes that this is a vulnerability. Alt…EPSS 2.0%9.8CVE-2019-25042Nlnetlabs unbound out-of-bounds write vulnerabilityUnbound before 1.9.5 allows an out-of-bounds write via a compressed name in rdata_copy. NOTE: The vendor disputes that this is a vulnerability. Altho…EPSS 2.0%9.1CVE-2026-81642Nlnetlabs unbound heap-based buffer overflow vulnerabilityIn NLnet Labs Unbound up to and including 1.26.0, a vulnerability was found in the DNSSEC validator that enables denial of service and possible remot…EPSS 0.96%

Source: NIST National Vulnerability Database (record CVE-2026-40691), CISA KEV, FIRST EPSS (scores of 2026-09-28). This page is refreshed as NVD updates the record.