CVE-2026-40691: Heap buffer overflow in Unbound DNSCrypt TCP reply encryption
- Vendor
- Nlnet Labs
CVE-2026-40691 is a heap-based buffer overflow affecting Unbound versions 1.9.0 through 1.25.1 inclusive when DNSCrypt is enabled. The routine performing in-place encryption of DNSCrypt replies over TCP fails to bound the reply length against the destination buffer capacity. Unlike the UDP processing path, the TCP path omits a protective size clamp. A reply larger than 65,504 bytes is shifted forward by 48 bytes within a heap buffer sized according to msg-buffer-size, causing an out-of-bounds write. A single crafted encrypted query can crash the resolver and cause denial of service. The vulnerability is fixed in Unbound 1.25.2.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
A remote attacker can crash an affected Unbound resolver with a single crafted DNSCrypt query over TCP, interrupting DNS resolution for clients relying on that resolver. Repeated exploitation could sustain service disruption. Although the underlying flaw corrupts heap memory, arbitrary code execution, information disclosure, and DNS cache poisoning are not established impacts of this vulnerability.
Mitigation
If you can’t patch tonight, do this now.
Until patched, disable DNSCrypt by removing or disabling the dnscrypt configuration on listening interfaces, or deploy Unbound without DNSCrypt support. Blocking access to the DNSCrypt TCP listener prevents remote access to the vulnerable processing path; limiting that listener to trusted clients reduces exposure but does not correct the buffer overflow.
Remediation
Patch, then assume compromise.
Upgrade to Unbound 1.25.2 or a later release containing the fix, or install the applicable distribution security update. Debian 13 provides a fixed package in version 1.26.1-0+deb13u1 through DSA-6507-1. Ubuntu provides release-specific updates through USN-8946-1; affected Ubuntu 18.04 and 20.04 LTS installations require Ubuntu Pro for these updates.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2026-40691 exploited in the wild?
- As of Nov 7, 2026, Mallory has no reports of CVE-2026-40691 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-40691?
- As of Nov 7, 2026, Mallory has found no public exploit for CVE-2026-40691.
- Is there a patch for CVE-2026-40691?
- Upgrade to Unbound 1.25.2 or a later release containing the fix, or install the applicable distribution security update. Debian 13 provides a fixed package in version 1.26.1-0+deb13u1 through DSA-6507-1.
- What products are affected by CVE-2026-40691?
- Nlnet Labs Unbound.
- How severe is CVE-2026-40691?
- CVE-2026-40691 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 0.29% (22nd percentile) as of Nov 7, 2026.
Recent activity
13 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.