Skip to main content
Mallory
HighVulnerability

CVE-2026-40691: Heap buffer overflow in Unbound DNSCrypt TCP reply encryption

Published Jul 22, 2026 · Updated 10 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days4 mentions · peak 2 in a dayToday
CVSS7.5High · v3.1
EPSS0.29%22nd percentile
CISA KEVNoNot listed
In the wildNoneNo exploitation reported
Vendor
Nlnet Labs
IdentifiersCVE-2026-40691CWE-122 · Heap-based Buffer Overflow

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

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.

Public exploits

Exploits

No public exploits tracked yet. Mallory keeps watching.

View more in app →
No public exploit code observed for this vulnerability. Mallory keeps watching.
Exposure surface

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.

VendorProductType
Nlnet LabsUnboundapplication
FAQ

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.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity3Community discussion across Reddit, Mastodon, and other social sources.