The CVE number for this vulnerability is CVE-2026-42944. == Summary A vulnerability was found in Unbound that results in heap overflow when encoding multiple NSID and/or DNS Cookie EDNS and/or EDNS Padding options in the reply packet. The relevant options ('nsid', 'answer-cookie', 'pad-responses' (default)) need to be enabled for the vulnerability to be exploited. Unbound 1.25.1 includes a fix to de-duplicate the EDNS options and a fix to prevent truncation of the EDNS field size calculation that also contributes to the heap overflow. == Affected products Unbound 1.14.0 up to and including version 1.25.0. == Description An adversary who can query Unbound can exploit the vulnerability by attaching multiple NSID and/or DNS Cookie EDNS and/or EDNS Padding options to the query. A flaw in the size calculation of the EDNS field truncates the correct value which allows the encoder to overflow the available space when writing. Those two combined lead to a heap overflow write of Unbound controlled data and eventually a crash. Unbound 1.25.1 includes a fix to de-duplicate the EDNS options and a fix to prevent truncation of the EDNS field size calculation. == Mitigation === Downloading patched version Unbound 1.25.1 is released with the patch https://nlnetlabs.nl/downloads/unbound/unbound-1.25.1.tar.gz === Applying the patch manually For Unbound 1.25.0 the patch is: https://nlnetlabs.nl/downloads/unbound/patch_CVE-2026-42944_with.diff Apply the patch on the Unbound source directory with: patch -p1 < patch_CVE-2026-42944_with.diff then run 'make install' to install Unbound. A minimal patch that only addresses the de-duplication is: https://nlnetlabs.nl/downloads/unbound/patch_CVE-2026-42944.diff and can be used INSTEAD for easier patching. Both patches mitigate the vulnerability and are tested to work on Unbound 1.25.0. == Acknowledgments We would like to thank Qifan Zhang from Palo Alto Networks for discovering and responsibly disclosing the vulnerability.