{"schemaVersion":3,"id":"CVE-2026-40691","aliases":["UBUNTU-CVE-2026-40691","DEBIAN-CVE-2026-40691"],"status":"published","duplicateOf":null,"title":null,"description":"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.","dates":{"published":"2026-07-22T13:04:35.410Z","modified":"2026-07-22T14:31:26.565Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.5,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":10,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.5,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00293,"percentile":0.20575,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00293},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00293,"percentile":0.20575}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.0046,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00293,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00293,"percentile":0.20575}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-122","name":"Heap-based Buffer Overflow","description":"A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().","type":"weakness","status":"Draft","abstraction":"Variant","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/122.html"},{"id":"CWE-787","name":"Out-of-bounds Write","description":"The product writes data past the end, or before the beginning, of the intended buffer.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/787.html"}],"affected":[{"vendor":"debian","product":"unbound","name":"unbound","label":"unbound","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/unbound","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 1.26.1-0+deb13u1","noFixRecorded":false,"fixedIn":null},{"text":"< 1.25.2-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 1.26.1-0+deb13u1 | < 1.25.2-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"unbound","name":"unbound","label":"unbound","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/unbound","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"nlnet labs","product":"unbound","name":"Unbound","label":"unbound","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.9.0, < 1.25.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.9.0, < 1.25.2","eol":null,"hubHref":"/vendor/nlnet_labs/unbound"},{"vendor":"nlnetlabs","product":"unbound","name":"unbound","label":"unbound","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.9.0, < 1.25.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.9.0, < 1.25.2","eol":null,"hubHref":"/vendor/nlnetlabs/unbound"}],"affectedCount":4,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://www.nlnetlabs.nl/downloads/unbound/CVE-2026-40691.txt","label":"www.nlnetlabs.nl/downloads/unbound/CVE-2026-40691.txt","hostname":"www.nlnetlabs.nl","tags":["Vendor Advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-40691","label":"ubuntu.com/security/CVE-2026-40691","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-40691","label":"www.cve.org/CVERecord?id=CVE-2026-40691","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://community.nlnetlabs.nl/t/unbound-1-25-2-released/3430","label":"community.nlnetlabs.nl/t/unbound-1-25-2-released/3430","hostname":"community.nlnetlabs.nl","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-40691","label":"security-tracker.debian.org/tracker/CVE-2026-40691","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40691","label":"nvd.nist.gov/vuln/detail/CVE-2026-40691","hostname":"nvd.nist.gov","tags":["Oval","Advisory"]}],"lineage":{"upstream":[],"downstream":["MGASA-2026-0316","MGASA-2026-0451","OPENSUSE-SU-2026:11380-1","OPENSUSE-SU-2026:21550-1","RHSA-2026:43588","SUSE-SU-2026:23050-1","SUSE-SU-2026:23215-1","SUSE-SU-2026:23226-1","SUSE-SU-2026:23349-1","SUSE-SU-2026:23360-1","SUSE-SU-2026:3884-1","SUSE-SU-2026:3885-1"],"duplicates":[],"related":["OPENSUSE-SU-2026:11380-1","OPENSUSE-SU-2026:21550-1","SUSE-SU-2026:23050-1","SUSE-SU-2026:23215-1","SUSE-SU-2026:23226-1","SUSE-SU-2026:23349-1","SUSE-SU-2026:23360-1","SUSE-SU-2026:3884-1","SUSE-SU-2026:3885-1"]},"timeline":[{"kind":"published","date":"2026-07-22T13:04:35.410Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-07-22T14:31:26.565Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":30,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T06:13:46.040Z","stale":false,"partial":false}}