{"id":"UBUNTU-CVE-2026-40691","details":"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.","modified":"2026-11-11T09:58:15.116394832Z","published":"2026-07-22T14:17:00Z","related":["USN-8946-1","USN-8946-2"],"upstream":["CVE-2026-40691"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-40691"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-40691"},{"type":"REPORT","url":"https://community.nlnetlabs.nl/t/unbound-1-25-2-released/3430"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-8946-1"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-8946-2"}],"affected":[{"package":{"name":"unbound","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/unbound?arch=source&distro=esm-infra%2Fbionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.6.7-1ubuntu2.6+esm6"}]}],"versions":["1.6.5-1","1.6.7-1","1.6.7-1build1","1.6.7-1ubuntu1","1.6.7-1ubuntu2","1.6.7-1ubuntu2.1","1.6.7-1ubuntu2.2","1.6.7-1ubuntu2.3","1.6.7-1ubuntu2.4","1.6.7-1ubuntu2.5","1.6.7-1ubuntu2.6","1.6.7-1ubuntu2.6+esm2","1.6.7-1ubuntu2.6+esm3","1.6.7-1ubuntu2.6+esm4","1.6.7-1ubuntu2.6+esm5"],"ecosystem_specific":{"binaries":[{"binary_version":"1.6.7-1ubuntu2.6+esm6","binary_name":"libunbound2"},{"binary_version":"1.6.7-1ubuntu2.6+esm6","binary_name":"python-unbound"},{"binary_version":"1.6.7-1ubuntu2.6+esm6","binary_name":"python3-unbound"},{"binary_name":"unbound","binary_version":"1.6.7-1ubuntu2.6+esm6"},{"binary_version":"1.6.7-1ubuntu2.6+esm6","binary_name":"unbound-anchor"},{"binary_name":"unbound-host","binary_version":"1.6.7-1ubuntu2.6+esm6"}],"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40691.json"}},{"package":{"name":"unbound","ecosystem":"Ubuntu:Pro:20.04:LTS","purl":"pkg:deb/ubuntu/unbound?arch=source&distro=esm-infra%2Ffocal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.9.4-2ubuntu1.11+esm3"}]}],"versions":["1.9.0-2ubuntu1","1.9.0-2ubuntu2","1.9.4-2","1.9.4-2ubuntu1","1.9.4-2ubuntu1.1","1.9.4-2ubuntu1.2","1.9.4-2ubuntu1.3","1.9.4-2ubuntu1.4","1.9.4-2ubuntu1.5","1.9.4-2ubuntu1.6","1.9.4-2ubuntu1.8","1.9.4-2ubuntu1.9","1.9.4-2ubuntu1.11","1.9.4-2ubuntu1.11+esm1","1.9.4-2ubuntu1.11+esm2"],"ecosystem_specific":{"binaries":[{"binary_version":"1.9.4-2ubuntu1.11+esm3","binary_name":"libunbound8"},{"binary_name":"python-unbound","binary_version":"1.9.4-2ubuntu1.11+esm3"},{"binary_name":"python3-unbound","binary_version":"1.9.4-2ubuntu1.11+esm3"},{"binary_name":"unbound","binary_version":"1.9.4-2ubuntu1.11+esm3"},{"binary_name":"unbound-anchor","binary_version":"1.9.4-2ubuntu1.11+esm3"},{"binary_name":"unbound-host","binary_version":"1.9.4-2ubuntu1.11+esm3"}],"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40691.json"}},{"package":{"name":"unbound","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/unbound?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.13.1-1ubuntu5.17"}]}],"versions":["1.13.1-1ubuntu1","1.13.1-1ubuntu3","1.13.1-1ubuntu5","1.13.1-1ubuntu5.1","1.13.1-1ubuntu5.2","1.13.1-1ubuntu5.3","1.13.1-1ubuntu5.4","1.13.1-1ubuntu5.5","1.13.1-1ubuntu5.7","1.13.1-1ubuntu5.8","1.13.1-1ubuntu5.10","1.13.1-1ubuntu5.11","1.13.1-1ubuntu5.12","1.13.1-1ubuntu5.13","1.13.1-1ubuntu5.14","1.13.1-1ubuntu5.15","1.13.1-1ubuntu5.16"],"ecosystem_specific":{"binaries":[{"binary_name":"libunbound8","binary_version":"1.13.1-1ubuntu5.17"},{"binary_version":"1.13.1-1ubuntu5.17","binary_name":"python3-unbound"},{"binary_name":"unbound","binary_version":"1.13.1-1ubuntu5.17"},{"binary_name":"unbound-anchor","binary_version":"1.13.1-1ubuntu5.17"},{"binary_name":"unbound-host","binary_version":"1.13.1-1ubuntu5.17"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40691.json"}},{"package":{"name":"unbound","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/unbound?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.19.2-1ubuntu3.12"}]}],"versions":["1.17.1-2","1.18.0-2ubuntu1","1.18.0-2ubuntu2","1.19.1-1ubuntu1","1.19.2-1ubuntu1","1.19.2-1ubuntu3","1.19.2-1ubuntu3.1","1.19.2-1ubuntu3.2","1.19.2-1ubuntu3.3","1.19.2-1ubuntu3.4","1.19.2-1ubuntu3.5","1.19.2-1ubuntu3.6","1.19.2-1ubuntu3.7","1.19.2-1ubuntu3.8","1.19.2-1ubuntu3.9","1.19.2-1ubuntu3.10"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"libunbound8","binary_version":"1.19.2-1ubuntu3.12"},{"binary_name":"python3-unbound","binary_version":"1.19.2-1ubuntu3.12"},{"binary_name":"unbound","binary_version":"1.19.2-1ubuntu3.12"},{"binary_name":"unbound-anchor","binary_version":"1.19.2-1ubuntu3.12"},{"binary_name":"unbound-host","binary_version":"1.19.2-1ubuntu3.12"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40691.json"}},{"package":{"name":"unbound","ecosystem":"Ubuntu:26.10","purl":"pkg:deb/ubuntu/unbound?arch=source&distro=stonking"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.25.1-1ubuntu3.1"}]}],"versions":["1.24.2-1ubuntu2","1.25.1-1ubuntu1","1.25.1-1ubuntu3"],"ecosystem_specific":{"binaries":[{"binary_name":"libunbound8","binary_version":"1.25.1-1ubuntu3.1"},{"binary_version":"1.25.1-1ubuntu3.1","binary_name":"python3-unbound"},{"binary_version":"1.25.1-1ubuntu3.1","binary_name":"unbound"},{"binary_name":"unbound-anchor","binary_version":"1.25.1-1ubuntu3.1"},{"binary_name":"unbound-host","binary_version":"1.25.1-1ubuntu3.1"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40691.json"}},{"package":{"name":"unbound","ecosystem":"Ubuntu:26.04:LTS","purl":"pkg:deb/ubuntu/unbound?arch=source&distro=resolute"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.24.2-1ubuntu2.4"}]}],"versions":["1.22.0-2ubuntu2","1.22.0-2ubuntu4","1.24.2-1ubuntu1","1.24.2-1ubuntu2","1.24.2-1ubuntu2.1","1.24.2-1ubuntu2.2","1.24.2-1ubuntu2.3"],"ecosystem_specific":{"binaries":[{"binary_name":"libunbound8","binary_version":"1.24.2-1ubuntu2.4"},{"binary_name":"python3-unbound","binary_version":"1.24.2-1ubuntu2.4"},{"binary_name":"unbound","binary_version":"1.24.2-1ubuntu2.4"},{"binary_version":"1.24.2-1ubuntu2.4","binary_name":"unbound-anchor"},{"binary_name":"unbound-host","binary_version":"1.24.2-1ubuntu2.4"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-40691.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}