Packet of death for DNSCrypt over TCP

Summary

CVECVE-2026-40691
StatePUBLISHED
AssignerNLnet Labs
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-07-22 14:17:18 UTC
Updated2026-07-22 20:33:11 UTC
DescriptionIn 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.

Risk And Classification

Primary CVSS: v3.1 7.5 HIGH from [email protected]

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

Problem Types: CWE-122 | CWE-787 | CWE-122 CWE-122: Heap-based Buffer Overflow | CWE-787 CWE-787: Out-of-bounds Write


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
3.1CNACVSS7.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA NLnet Labs Unbound affected 1.9.0 1.25.2 semver Not specified

References

ReferenceSourceLinkTags
www.nlnetlabs.nl/downloads/unbound/CVE-2026-40691.txt [email protected] www.nlnetlabs.nl
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Qifan Zhang (Palo Alto Networks) (en)

CNA: Trung Nguyen (@everping, CyStack) (en)

Additional Advisory Data

SourceTimeEvent
CNA2026-05-18T00:00:00.000ZIssue reported by Qifan Zhang
CNA2026-06-10T00:00:00.000ZNLnet Labs shares patch with Qifan Zhang
CNA2026-06-13T00:00:00.000ZQifan Zhang verifies patch
CNA2026-06-30T00:00:00.000ZIssue reported by Trung Nguyen
CNA2026-07-02T00:00:00.000ZNLnet Labs shares patch with Trung Nguyen
CNA2026-07-02T00:00:00.000ZTrung Nguyen suggests extra fixes
CNA2026-07-03T00:00:00.000ZNLnet Labs shares new version of the patch with Trung Nguyen
CNA2026-07-04T00:00:00.000ZTrung Nguyen verifies patch
CNA2026-07-22T00:00:00.000ZFixes released with version 1.25.2

Solutions

CNA: This issue is fixed starting with version 1.25.2

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report