The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-5172

CVE-2026-5172: dnsmasq Buffer Overflow Vulnerability

CVE-2026-5172 is a buffer overflow flaw in dnsmasq's extract_addresses() function that enables attackers to crash the service via malformed DNS responses. This article covers technical details, impact, and mitigation.

Published: May 18, 2026

CVE-2026-5172 Overview

CVE-2026-5172 is a buffer overflow vulnerability in the extract_addresses() function of dnsmasq, a widely deployed lightweight DNS forwarder and DHCP server. The flaw allows a remote attacker to trigger a heap out-of-bounds read by sending a malformed DNS response. The extract_name() helper advances a pointer past the end of the DNS record, causing the process to read memory outside the allocated buffer and crash. The issue affects downstream projects that embed or rely on dnsmasq, including Pi-hole FTL and various Linux distribution packages.

Critical Impact

A network-reachable attacker can crash dnsmasq with a single malformed DNS response, disrupting DNS resolution and DHCP services for all downstream clients.

Affected Products

  • dnsmasq (upstream releases prior to the fix referenced in the dnsmasq-discuss mailing list)
  • Pi-hole FTL versions prior to v6.6.2
  • NixOS packages updated via pull requests #519082 and #519093

Discovery Timeline

  • 2026-05-11 - CVE-2026-5172 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-5172

Vulnerability Analysis

The vulnerability resides in dnsmasq's response-parsing logic. When dnsmasq receives a DNS response from an upstream resolver, it calls extract_addresses() to iterate over answer records and pull out A and AAAA records for caching. For each record, the function invokes extract_name() to decompress the DNS name encoded in the answer section.

extract_name() walks the compressed name pointer-by-pointer but does not bound its progress against the end offset of the current resource record. A malformed record can cause the pointer to advance past the record boundary and into adjacent heap memory. The subsequent read produces an out-of-bounds read that dereferences memory outside the response buffer, terminating the dnsmasq process.

Because dnsmasq commonly runs as a system daemon servicing DNS and DHCP for entire networks, a crash interrupts name resolution and lease handling for every downstream client until the service restarts.

Root Cause

The root cause is missing length validation inside extract_name() when it is invoked from extract_addresses(). The function trusts the compressed name structure rather than enforcing that pointer advancement stays within the record's declared length. This is a classic boundary condition error leading to a heap out-of-bounds read.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker who controls or can spoof an upstream DNS response — for example, an authoritative server that dnsmasq queries, or an on-path attacker injecting forged responses — can deliver a crafted answer that triggers the read. Open-resolver deployments expand the attack surface to the public internet.

The vulnerability is described in prose only; no public proof-of-concept exploit is referenced in the advisory. See the DNSMasq Discuss Mailing List Post and CERT Vulnerability Advisory #471747 for technical details.

Detection Methods for CVE-2026-5172

Indicators of Compromise

  • Repeated unexpected restarts or crash loops of the dnsmasq or pihole-FTL daemon
  • Segmentation fault entries in journalctl -u dnsmasq or /var/log/syslog correlated with inbound DNS responses
  • Core dumps with stack frames in extract_name and extract_addresses

Detection Strategies

  • Monitor process telemetry for abnormal termination signals (SIGSEGV) targeting DNS resolver daemons.
  • Inspect upstream DNS response traffic for malformed answer sections, unusual compression pointers, or records whose declared length does not match parsed content.
  • Correlate daemon restarts with the source IPs of preceding upstream DNS responses to identify the trigger.

Monitoring Recommendations

  • Alert on dnsmasq or Pi-hole FTL service restart counts exceeding a baseline within a short window.
  • Forward DNS resolver logs and crash telemetry to a centralized SIEM for correlation across hosts.
  • Track DNS resolution failure rates on client subnets as an early signal of resolver instability.

How to Mitigate CVE-2026-5172

Immediate Actions Required

  • Upgrade Pi-hole FTL to v6.6.2 or later, which includes the upstream fix.
  • Apply the patched dnsmasq package from your Linux distribution as soon as it becomes available; NixOS users can track pull requests #519082 and #519093.
  • Restrict dnsmasq's upstream resolvers to trusted servers and avoid exposing the resolver to untrusted networks.

Patch Information

Upstream patches are tracked on the DNSMasq CVE Resource page and discussed in the DNSMasq Discuss Mailing List Post. Pi-hole shipped the fix in Pi-hole FTL Release v6.6.2. Distribution packaging updates are tracked in GitHub Pull Request #519082 and GitHub Pull Request #519093.

Workarounds

  • Configure dnsmasq to forward only to trusted, validating upstream resolvers that drop malformed responses.
  • Bind dnsmasq to internal interfaces using interface= and bind-interfaces to prevent external query exposure.
  • Deploy a service supervisor such as systemd with automatic restart to reduce outage duration until patches are applied.
bash
# Configuration example: restrict dnsmasq to internal interface and trusted upstream
listen-address=127.0.0.1,192.168.1.1
interface=eth0
bind-interfaces
no-resolv
server=1.1.1.1
server=9.9.9.9

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechDnsmasq

  • SeverityHIGH

  • CVSS Score7.3

  • EPSS Probability0.08%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • Technical References
  • GitHub Pull Request #519082

  • GitHub Pull Request #519093

  • Pi-hole FTL Release v6.6.2

  • DNSMasq Discuss Mailing List Post

  • DNSMasq CVE Resource

  • CERT Vulnerability Advisory #471747
  • Related CVEs
  • CVE-2026-2291: dnsmasq Buffer Overflow Vulnerability

  • CVE-2026-4893: dnsmasq Information Disclosure Vulnerability

  • CVE-2026-4892: dnsmasq DHCPv6 RCE Vulnerability

  • CVE-2026-4890: dnsmasq DNSSEC Validation DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English