Skip to main content
Vulnerability Database/CVE-2026-101339

CVE-2026-101339: NSD DNS Server Buffer Overflow Vulnerability

CVE-2026-101339 is a buffer overflow flaw in NSD DNS server that allows attackers to overwrite the stack with up to 191 bytes of controlled data. This post explains its technical details, affected versions, and mitigation steps.

Published:

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-101339 Overview

CVE-2026-101339 is a stack-based buffer overflow [CWE-121] affecting NLnet Labs NSD (Name Server Daemon). A crafted Host Identity Protocol (HIP) resource record whose RDATA fills the field near its limit and includes an additional dname RDATA field for a HIP Rendezvous server can overwrite up to 191 bytes of the stack with attacker-controlled data. The malicious record must be loaded directly from a zone file fed to NSD. Zone files produced by NSD itself, such as for secondary zones, are not formatted in a way that triggers the condition. Operator-controlled provisioning systems that supply zone files to NSD remain a realistic injection path.

Critical Impact

Stack memory corruption with up to 191 bytes of attacker-controlled data, enabling potential arbitrary code execution in the authoritative DNS server process.

Affected Products

  • NLnet Labs NSD (Name Server Daemon)
  • Deployments ingesting externally sourced zone files
  • Authoritative DNS servers supporting HIP resource records

Discovery Timeline

  • 2026-10-14 - CVE CVE-2026-101339 published to NVD
  • 2026-10-14 - Last updated in NVD database

Technical Details for CVE-2026-101339

Vulnerability Analysis

The flaw resides in NSD's parser for HIP (Host Identity Protocol) resource records, defined in RFC 8005. A HIP record contains a public key, HIT (Host Identity Tag), and optionally one or more Rendezvous Server domain names stored in RDATA. When the RDATA length is driven near the DNS field maximum and an additional dname field for a Rendezvous server is appended, the parser writes past the destination stack buffer.

The overflow allows up to 191 bytes of attacker-controlled bytes to overwrite adjacent stack memory. Depending on compiler mitigations such as stack canaries and ASLR, consequences range from process termination to arbitrary code execution within the NSD daemon context.

Root Cause

The root cause is missing length validation when concatenating the Rendezvous server dname into the RDATA buffer. The parser trusts the inbound record size without accounting for the additional appended domain name, resulting in a classic stack buffer overflow [CWE-121].

Attack Vector

Exploitation requires the attacker to deliver a crafted zone file to NSD. The malicious record will not appear through normal AXFR/IXFR secondary transfers because NSD reformats these zones before writing them. Instead, the attack path runs through operator-controlled provisioning pipelines, Git-backed zone repositories, or any workflow that feeds raw zone files to NSD. See the NLnet Labs advisory for CVE-2026-101339 for parser-level details.

Detection Methods for CVE-2026-101339

Indicators of Compromise

  • Unexpected crashes or segmentation faults in the nsd process coinciding with zone reloads
  • Zone files containing HIP resource records with RDATA lengths at or near the DNS field maximum
  • HIP records combining a large public key or HIT with one or more Rendezvous server dname entries from untrusted sources

Detection Strategies

  • Scan all zone files staged for NSD ingestion for records of type HIP (RR type 55) and flag those with oversized RDATA.
  • Monitor NSD worker processes for abnormal termination, core dumps, or restart loops following zone deployment.
  • Audit provisioning systems and Git repositories feeding zone content to NSD for unauthorized record additions.

Monitoring Recommendations

  • Alert on nsd process exits with non-zero status or signals such as SIGSEGV and SIGABRT.
  • Log and review every zone file change prior to nsd-control reload, including author and content diff.
  • Correlate DNS daemon telemetry with endpoint process events to detect post-exploit activity.

How to Mitigate CVE-2026-101339

Immediate Actions Required

  • Apply the fixed NSD release from NLnet Labs as soon as it is available for your distribution.
  • Restrict write access to zone file source directories and provisioning pipelines to trusted operators only.
  • Validate and sanitize any zone files received from third parties before loading them into NSD.

Patch Information

Refer to the NLnet Labs advisory for CVE-2026-101339 for the patched NSD version and upgrade instructions. Rebuild from source or install vendor packages that include the fix for the HIP RDATA parser.

Workarounds

  • Reject or strip HIP (type 55) resource records from zone files prior to ingestion if HIP is not required in your environment.
  • Use NSD only with zones generated by NSD itself or by trusted secondary transfers, avoiding operator-supplied raw zone files.
  • Run NSD under a non-privileged account with chroot and seccomp filters to reduce the blast radius of successful exploitation.
bash
# Configuration example: scan a staged zone file for HIP records before loading
grep -E '^[^;]*\sIN\s+HIP\s' /etc/nsd/zones/staging/*.zone && \
  echo "HIP record detected - manual review required" && exit 1

# Validate zone syntax before reload
nsd-checkzone example.com /etc/nsd/zones/staging/example.com.zone && \
  nsd-control reload example.com

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.