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

CVE-2026-112273: libtins DNS Buffer Overflow Vulnerability

CVE-2026-112273 is a heap out-of-bounds read flaw in libtins DNS parsing that allows attackers to crash applications through crafted DNS packets. 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-112273 Overview

CVE-2026-112273 is a heap out-of-bounds read vulnerability in libtins through version 4.6, a C++ library for packet crafting and sniffing. The flaw resides in DNS::compose_name within src/dns.cpp. Remote attackers can send crafted DNS packets whose additional, answer, or authority records contain a label ending exactly at the packet boundary. Parsing such a record triggers a one-byte read past the packet buffer. On systems using hardened allocators, this out-of-bounds access crashes the consuming application, producing a denial-of-service condition. The weakness is tracked under CWE-125 (Out-of-Bounds Read).

Critical Impact

Remote attackers can crash any application built on libtins through 4.6 by delivering a single malformed DNS packet.

Affected Products

  • libtins versions up to and including 4.6
  • Applications and sensors statically or dynamically linking vulnerable libtins
  • Network tooling using libtins for DNS packet parsing

Discovery Timeline

  • 2026-10-19 - CVE-2026-112273 published to the National Vulnerability Database
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-112273

Vulnerability Analysis

The defect lives in the DNS name decompression logic inside src/dns.cpp lines 338-389. DNS::compose_name walks label length prefixes to reconstruct DNS names. When a label length byte sits at the final offset of the packet buffer, the parser advances one byte past the end of the heap allocation while attempting to read the next character. Standard allocators mask the issue, but hardened allocators such as those used by AddressSanitizer, GWP-ASan, or Scudo abort the process on detection.

The vulnerability affects any resource record whose RDATA contains DNS names, including additional, answer, and authority sections. Consumers include intrusion detection sensors, DNS analyzers, and packet-replay utilities. See the VulnCheck advisory and the HackMD technical write-up for parsing traces.

Root Cause

compose_name lacks a bounds check comparing the read cursor against packet_end before dereferencing the byte that follows a label length. When the length prefix terminates a label precisely at the packet tail, the subsequent read falls outside the heap chunk owned by the packet buffer.

Attack Vector

Exploitation requires no authentication or user interaction. An attacker crafts a DNS response or query where an answer, authority, or additional record encodes a label ending at the exact byte boundary of the datagram. Delivering the packet to any process parsing network traffic with libtins triggers the out-of-bounds read.

No verified proof-of-concept code is published. See the HackMD analysis
for packet-level reproduction details:
https://hackmd.io/@haindpwn/libtins-dns-name-parsing-oob-read

Detection Methods for CVE-2026-112273

Indicators of Compromise

  • Unexpected crashes or SIGABRT termination in processes linking libtins, especially those parsing live DNS traffic
  • AddressSanitizer or Scudo reports citing heap-buffer-overflow reads inside Tins::DNS::compose_name
  • Malformed DNS datagrams whose final byte is a non-zero label length prefix

Detection Strategies

  • Deploy packet inspection rules that flag DNS messages where the parsed record section extends to or past the UDP payload boundary without a terminating null label
  • Enable AddressSanitizer or hardened allocator builds in staging environments to surface the fault during fuzzing
  • Correlate crash telemetry from DNS analyzers and IDS sensors with inbound DNS traffic bursts

Monitoring Recommendations

  • Monitor crash dumps and systemd service restart counters for applications dependent on libtins
  • Capture full packet traces for sensors that terminate unexpectedly to allow offline triage
  • Alert on unusually short DNS responses or responses whose record counts do not match the parsed payload length

How to Mitigate CVE-2026-112273

Immediate Actions Required

  • Inventory all internally developed and third-party tools that embed libtins through 4.6
  • Restrict exposure of DNS parsing services to untrusted networks until a fix is applied
  • Rebuild dependent binaries once an upstream patch is published and track the project's GitHub repository for updates

Patch Information

At the time of NVD publication (2026-10-19) and last modification (2026-10-22), no fixed release of libtins has been identified in the referenced advisories. Consult the VulnCheck advisory and the upstream libtins repository for the latest patch status.

Workarounds

  • Apply a local patch adding a bounds check in DNS::compose_name that validates the read cursor against the packet end before dereferencing the next byte
  • Drop or pre-filter DNS packets whose length is inconsistent with the declared record counts at the network edge
  • Run vulnerable services under a supervisor that restarts crashed processes while deeper mitigations are evaluated
bash
# Example edge filter dropping truncated DNS over UDP (adjust to environment)
iptables -A INPUT -p udp --sport 53 -m length --length 0:40 -j DROP

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.