CVEfocus › CVE database › CVE-2026-40691

CVE-2026-40691Packet of death for DNSCrypt over TCP

CVSS 7.5 HighEPSS 0.5% (higher than 32% of CVEs)Published 2026-07-22Updated 2026-07-22Assigner: NLnet Labs

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.

CWE-122CWE-787

What to do

Fixed builds are available from Debian, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

6Fixed
2Fix pending
1Will not fix
24Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10unboundFixed1.25.1-1ubuntu3.1UBUNTU-CVE-2026-40691
Ubuntu 26.04unboundFixed1.24.2-1ubuntu2.4UBUNTU-CVE-2026-40691
Ubuntu 24.04unboundFixed1.19.2-1ubuntu3.12UBUNTU-CVE-2026-40691
Ubuntu 22.04unboundFixed1.13.1-1ubuntu5.17UBUNTU-CVE-2026-40691
Ubuntu 20.04unboundFix pending1.9.4-2ubuntu1.11+esm3 (Ubuntu Pro)UBUNTU-CVE-2026-40691
Ubuntu 18.04unboundFix pending1.6.7-1ubuntu2.6+esm6 (Ubuntu Pro)UBUNTU-CVE-2026-40691
Debian 14unboundFixed1.25.2-1DEBIAN-CVE-2026-40691
Debian 13unboundFixed1.26.1-0+deb13u1DEBIAN-CVE-2026-40691
Debian 12unboundWill not fix
Debian rates this unimportant for its packages (a minor issue, or one that doesn't affect Debian's build), so no security update is planned.
DEBIAN-CVE-2026-40691
Red Hat Enterprise Linux 10python3-unboundNot affected
Red Hat Enterprise Linux 10unboundNot affected
Red Hat Enterprise Linux 10unbound-anchorNot affected
Red Hat Enterprise Linux 10unbound-develNot affected
Red Hat Enterprise Linux 10unbound-dracutNot affected
Red Hat Enterprise Linux 10unbound-libsNot affected
Red Hat Enterprise Linux 10unbound-utilsNot affected
Red Hat Enterprise Linux 9python3-unboundNot affected
Red Hat Enterprise Linux 9unboundNot affected
Red Hat Enterprise Linux 9unbound-develNot affected
Red Hat Enterprise Linux 9unbound-dracutNot affected
Red Hat Enterprise Linux 9unbound-libsNot affected
Red Hat Enterprise Linux 8python3-unboundNot affected
Red Hat Enterprise Linux 8unboundNot affected
Red Hat Enterprise Linux 8unbound-develNot affected
Red Hat Enterprise Linux 8unbound-libsNot affected
Red Hat Enterprise Linux 7unboundNot affected
Red Hat Enterprise Linux 7unbound-develNot affected
Red Hat Enterprise Linux 7unbound-libsNot affected
Red Hat Enterprise Linux 7unbound-pythonNot affected
Red Hat Enterprise Linux 6unboundNot affected
Red Hat Enterprise Linux 6unbound-develNot affected
Red Hat Enterprise Linux 6unbound-libsNot affected
Red Hat Enterprise Linux 6unbound-pythonNot affected

What the vendor says

As published in the CVE record by NLnet Labs, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: This issue is fixed starting with version 1.25.2

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.