CVE-2026-12245: NSD Heap Use-After-Free DoT Crash Vulnerability
NSD, a DNS nameserver software maintained by NLnet Labs, contains a memory safety defect that causes the server to crash when processing certain DNS-over-TLS (DoT) connections. An attacker can trivially trigger this crash by opening a DoT connection, sending a DNS query, and closing the connection before the response is read. The underlying issue is improper memory cleanup during error logging on these connections, allowing the freed memory to be accessed after it has been deallocated. While this does not enable data theft or system compromise, repeated crashes can degrade service availability.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-416
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-06-26
NVD description (verbatim)
NSD from version 4.13.0 has a heap use-after-free bug in logging errors on TLS connections, causing a crash of the server process, which can be triggered trivially by sending a DNS query over a DoT connection, and closing the connection without reading the response.
1 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-12245 is a heap use-after-free vulnerability (CWE-416) in NSD versions 4.13.0 and later. The defect occurs in the error logging path for TLS connections. When a DoT client closes the connection prematurely without consuming the server's response, the logging code attempts to reference memory that has already been freed, triggering a crash of the NSD process. The vulnerability is trivial to invoke—no special privileges, authentication, or network manipulation is required. Any unauthenticated remote user can send a specially sequenced DoT connection to cause denial of service.
Business impact
NSD is a critical DNS nameserver used by many organizations to host authoritative DNS zones. Availability of DNS services directly impacts business operations; outages can prevent users and systems from resolving domain names, disrupting web services, email delivery, and internal resource discovery. An attacker repeatedly exploiting this crash vulnerability could prevent legitimate DNS queries from being answered, effectively taking a DNS zone offline until the server is restarted. For organizations relying on NSD for production DNS, this represents a material availability risk. The impact scales with the number of DoT clients; environments with high DoT query volume may experience more frequent crashes.
Affected systems
NSD versions 4.13.0 and later are affected. Organizations running older versions (4.12.x and prior) are not vulnerable to this specific issue. Vulnerability affects both primary and secondary nameservers running affected versions. The attack surface is limited to DoT (DNS over TLS) connections; traditional unencrypted DNS queries over UDP and TCP are not affected. Environments with DoT enabled and accessible from untrusted networks face the greatest exposure.
Exploitability
This vulnerability has a low exploitation barrier. No special tools, credentials, or protocol knowledge beyond basic DoT client functionality is required. An attacker can craft the attack using standard TLS and DNS libraries available in most programming languages. The crash is deterministic and reliably reproducible. However, exploitation is not automated in public tools; NSD has not been added to the KEV (Known Exploited Vulnerabilities) catalog as of publication. The denial-of-service nature means the impact is temporary—service resumes after the process restarts—but the ease of reproduction makes it suitable for disruption campaigns or as part of a broader attack chain targeting DNS infrastructure.
Remediation
Apply security patches released by NLnet Labs that address the use-after-free condition in error logging. Patches are available for currently supported versions; verify the specific patched versions against the official NLnet Labs security advisory and your distribution's package repositories. As an interim mitigation, organizations can restrict DoT access to trusted clients using firewall or network access controls, reducing the exposed attack surface. Restarting the NSD process after a crash will restore service temporarily; however, patching is necessary to prevent recurrence.
Patch guidance
Check the NLnet Labs security advisory and your Linux distribution or package manager for patched NSD versions that resolve CVE-2026-12245. Update NSD as soon as patches are available. Verify the patched version against the advisory to confirm the fix is included. For organizations using binary packages, ensure your distribution's package maintainers have released updates. Test patches in a non-production environment before deployment to DNS infrastructure. Plan updates during a maintenance window to minimize service interruption during the package upgrade and NSD restart. Monitor NSD logs and process health immediately after patching to confirm stability.
Detection guidance
Monitor NSD process logs for errors related to TLS connection handling and memory management. Set up alerting for unexpected NSD process crashes or restarts, particularly if correlated with DoT query traffic spikes. Network-level detection is difficult without TLS decryption; however, organizations can monitor for patterns of DoT connection attempts followed by abrupt disconnections, which may indicate exploitation attempts. Implement process monitoring to detect and automatically restart NSD if it crashes, reducing mean time to recovery. Review your DNS query logs for evidence of DoT clients establishing connections and disconnecting without completing transactions.
Why prioritize this
This vulnerability earns HIGH priority because it enables remote denial of service with trivial exploitation requirements and no prerequisites. While not present in the KEV catalog, the low attack bar and impact to critical DNS infrastructure warrant rapid patching. Organizations operating authoritative DNS services should treat availability as a critical control objective. The specific attack vector (DoT connections) means organizations without DoT enabled face lower practical risk, but those with DoT exposed to untrusted networks should patch immediately. The deterministic nature of the crash also makes it suitable for weaponization in coordinated attacks against DNS providers or critical infrastructure operators.
Risk score, explained
The CVSS 3.1 score of 7.5 (HIGH) reflects a network-accessible vulnerability requiring no authentication or user interaction, with high availability impact and no confidentiality or integrity impact. The score correctly captures the severity: any remote attacker can crash the service. The score does not account for the specificity of the attack vector (DoT connections only) or the temporary nature of the denial of service (restarting restores service); however, for a critical service like authoritative DNS, even temporary outages carry business risk. The absence of confidentiality or integrity impact correctly prevents a CRITICAL rating.
Frequently asked questions
Does this vulnerability affect DNS queries over standard UDP or TCP (port 53)?
No. The vulnerability is specific to DNS-over-TLS (DoT) connections, typically on port 853. Unencrypted DNS traffic is not affected. Organizations operating NSD without DoT enabled do not face exposure via this vulnerability.
Can this vulnerability be exploited to steal DNS data or modify responses?
No. This is a denial-of-service vulnerability only. The use-after-free defect causes the process to crash; it does not enable memory disclosure or response tampering. There is no confidentiality or integrity impact.
What is the difference between NSD's availability risk and other DNS server vulnerabilities?
NSD is authoritative-only; it does not perform recursive resolution. It serves as the source of truth for specific DNS zones. An NSD outage means that zone becomes unreachable, blocking all services dependent on that domain. Recursive resolvers are less critical for specific domains but more critical for overall internet connectivity; the impact profile differs.
If NSD crashes, what is the recovery procedure?
NSD can be restarted manually or via a process supervisor (systemd, supervisord, etc.). Recovery is immediate upon restart. However, repeated crashes from ongoing exploitation will create an availability problem until the vulnerability is patched. Implementing automatic restart with alerting is recommended as a temporary mitigation.
This analysis is based on the CVE record and public vendor information as of the publication date. Patch availability, affected versions, and timeline for fixes may vary by distribution and deployment scenario. Organizations should verify patch status against NLnet Labs' official security advisory and their package maintainers. The vulnerability has not been assigned to the CISA KEV catalog as of this publication; inclusion in KEV would increase priority. Testing patches in non-production environments is strongly recommended before deploying to critical infrastructure. SEC.co does not provide vulnerability scanning, exploitation, or remediation services; consult your security vendor or NLnet Labs for technical support. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-60467HIGHGPAC MP4Box Use-After-Free DoS Vulnerability
- CVE-2026-0125HIGHAndroid VPU Race Condition Local Privilege Escalation
- CVE-2026-0137HIGHAndroid Edge TPU Use-After-Free Privilege Escalation
- CVE-2026-0143HIGHAndroid LWIS Use-After-Free Privilege Escalation (CVSS 7.8 HIGH)
- CVE-2026-10000HIGHChrome Sandbox Escape via Use-After-Free in Password Handling
- CVE-2026-10001HIGHChrome Sandbox Escape via PerformanceManager Use-After-Free
- CVE-2026-10002HIGHGoogle Chrome PDFium Use-After-Free Vulnerability (CVSS 8.8)
- CVE-2026-10003HIGHChrome Use-After-Free Code Execution Vulnerability Analysis