Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-101338 Overview
CVE-2026-101338 is a stack-based buffer overflow [CWE-121] in NLnet Labs NSD (Name Server Daemon). When a Service Binding (SVCB) or HTTPS resource record fills the wire-format RDATA to its maximum size, an additional Encrypted Client Hello (ECH) parameter can overwrite stack memory. Once the overflow exceeds the fixed boundary, the base64 decoder writes attacker-controlled data of unbounded size. Exploitation requires that a malicious zone file be fed directly to NSD, for example through an operator-controlled provisioning system. Zone files generated by NSD itself, such as those for secondary zones, are not formatted in a way that triggers the condition.
Critical Impact
An attacker able to supply a crafted zone file can corrupt stack memory in the authoritative DNS server, enabling memory disclosure, denial of service, or code execution in the NSD process.
Affected Products
- NLnet Labs NSD (Name Server Daemon)
- NSD deployments ingesting externally sourced zone files
- NSD instances integrated with operator provisioning pipelines
Discovery Timeline
- 2026-10-14 - CVE CVE-2026-101338 published to NVD
- 2026-10-14 - Last updated in NVD database
Technical Details for CVE-2026-101338
Vulnerability Analysis
The flaw resides in NSD's zone file parser handling of SVCB and HTTPS resource records. These record types carry a list of SvcParamKey=SvcParamValue pairs, including the ech parameter, whose value is base64 encoded. NSD assembles the parameters into a fixed-size wire-format RDATA buffer on the stack.
When prior SvcParams have already filled the RDATA buffer to its limit, the parser still proceeds to decode an additional ech parameter. The initial write overruns the stack buffer. The subsequent base64 decode loop lacks a bounded length check, allowing an attacker to append arbitrarily large decoded output beyond the allocated region. This gives the attacker control over adjacent stack contents, including saved registers and return addresses.
Root Cause
The root cause is missing boundary validation in two layers. First, the SvcParam assembly logic does not verify remaining space in the RDATA buffer before appending another parameter. Second, the base64 decoder trusts the caller to provide sufficient output capacity and does not enforce a maximum write length, producing an unbounded stack write.
Attack Vector
Exploitation requires an attacker to deliver a crafted zone file to the NSD instance. Direct zone-file ingestion is the attack surface: operator provisioning systems, CI pipelines, or any workflow that forwards third-party zone data into NSD can serve as the delivery channel. Secondary zones transferred over AXFR/IXFR and rewritten by NSD are not affected, because NSD's own output does not produce the triggering layout.
For technical context, see the NLnet Labs CVE-2026-101338 advisory.
Detection Methods for CVE-2026-101338
Indicators of Compromise
- Zone files containing SVCB (type 64) or HTTPS (type 65) records with maximum-length SvcParam sequences followed by an ech= parameter.
- NSD process crashes, segmentation faults, or stack smashing protector aborts logged by the service manager.
- Unexpected NSD restarts correlated with recent zone file loads from external provisioning systems.
Detection Strategies
- Parse incoming zone files prior to NSD ingestion and flag SVCB or HTTPS records whose cumulative SvcParam length approaches the wire-format maximum.
- Alert on NSD process termination signals (SIGSEGV, SIGABRT) using host-based monitoring.
- Audit provisioning pipelines for zone file sources that are not strictly controlled by trusted operators.
Monitoring Recommendations
- Enable core dump capture on NSD hosts to support post-incident forensics of suspected overflow attempts.
- Forward NSD and systemd journal logs to a centralized logging platform for anomaly review.
- Track checksum and provenance metadata for every zone file loaded into production NSD instances.
How to Mitigate CVE-2026-101338
Immediate Actions Required
- Upgrade NSD to the fixed release published by NLnet Labs as soon as it is available.
- Restrict write access to zone file directories and provisioning queues to trusted operators only.
- Validate all externally sourced zone data before loading, rejecting SVCB and HTTPS records with oversized SvcParam sets.
Patch Information
Refer to the NLnet Labs CVE-2026-101338 advisory for the fixed version string and release notes. Apply the upstream patch rather than attempting to backport changes locally.
Workarounds
- Do not accept zone files from untrusted sources until the patched NSD version is deployed.
- Pre-filter zone files to strip or reject SVCB and HTTPS records that contain an ech SvcParamKey.
- Run NSD under a hardened service manager configuration with stack protection, ASLR, and process isolation enabled.
# Configuration example: pre-flight check before loading a zone file into NSD
grep -E '\s(SVCB|HTTPS)\s.*ech=' /path/to/zone.db && \
echo "Zone contains ECH SvcParam, review before load" && exit 1
nsd-checkconf /etc/nsd/nsd.conf && \
nsd-control reload
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

