Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-5172: Heap out-of-bounds read in dnsmasq extract_addresses()

Published May 11, 2026 · Updated 8 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days4 mentions · peak 2 in a dayToday
CVSS7.5High · v3.1
EPSS2.7%86th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendor
Thekelleys
IdentifiersCVE-2026-5172CWE-125 · Out-of-bounds Read

CVE-2026-5172 is a heap out-of-bounds read vulnerability in dnsmasq's extract_addresses() function during DNS response processing. A malformed resource-record data length (rdlen) allows extract_name() to advance a pointer beyond the end of the record, resulting in an out-of-bounds heap read. Processing a specially crafted DNS response can crash dnsmasq and cause denial of service.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can terminate the dnsmasq process, interrupting DNS resolution for dependent clients. Arbitrary code execution, privilege escalation, cache poisoning, and externally observable memory disclosure are not established for this vulnerability.

Mitigation

If you can’t patch tonight, do this now.

Reduce exposure to untrusted DNS data paths until patched versions can be deployed. Limit dnsmasq use as a resolver for untrusted upstream responses where feasible, restrict which upstream DNS servers are permitted, and apply vendor firmware or package updates promptly. In embedded or appliance deployments, install the vendor-provided firmware release that includes the dnsmasq fix.

Remediation

Patch, then assume compromise.

Upgrade to dnsmasq 2.92rel2, which includes backported fixes, or version 2.93 or a later supported release. Alternatively, install a vendor package explicitly fixing CVE-2026-5172; corrected RHEL builds include 2.90-7.el10_2 and, for RHEL 10.0 extended-support offerings, 2.90-4.el10_0.1. Bundled-component fixes include ADS-TEC IRF1000/IRF3000 firmware 2.3.0, OpenWrt 24.10.8, and GitHub Enterprise Server 3.21.2; use currently supported releases where applicable.

Public exploits

Exploits

2 exploits validated by Mallory's analysis.

View more in app →
dnsmasq-cve-2026This repository is a dnsmasq vulnerability verification toolkit centered on CVE-2026-2291, CVE-2026-5172, CVE-2026-4890, CVE-2026-4891, CVE-2026-4892, and CVE-2026-4893. It is not tied to a common exploit framework. The repository contains four functional scripts plus documentation: (1) dnsmasq_cve_verify.py is the primary end-to-end black-box verifier that runs from a testing laptop, starts a malicious DNS service, sends trigger traffic to the DUT, and uses SSH to inspect dnsmasq state and logs before issuing PASS/FAIL verdicts; (2) malicious_dns_server.py is a standalone UDP DNS server that returns crafted malformed responses for manual reproduction of selected parser bugs, notably CVE-2026-5172 and DNSSEC-related issues; (3) test_dnsmasq_cve_remote.py is a lightweight remote detection script that queries version.bind over UDP/53 and infers vulnerability status from the reported dnsmasq version; and (4) test_dnsmasq_cve_on_device.sh is a shell-based local checker that runs on the target device and uses version/strings heuristics to assess patch status and feature applicability. The main exploit capability is network-based triggering of dnsmasq parsing flaws through malicious DNS responses. The code crafts malformed CNAME/rdlen combinations, DNSSEC/NSEC/RRSIG-related records, and ECS-related inputs to induce crashes, hangs, or logic bypasses in vulnerable dnsmasq builds. The README also describes a DHCPv6 CLID overflow test for CVE-2026-4892, which is a local/adjacent vector requiring DHCPv6 support and dhcp-script configuration. The repository therefore mixes active exploit-style verification with auxiliary detection scripts. Because payloads are hardcoded and purpose-built for QA verification rather than generalized post-exploitation, the maturity is best classified as OPERATIONAL rather than weaponized. Fingerprintable observables include the default DUT IP 192.168.1.1, example attacker IP 10.0.0.211, SSH on TCP/22, DNS on UDP/53, trigger domains such as crash-5172.evil.test and crash-2291.evil.test, the version.bind CHAOS TXT query, and DUT file paths like /etc/dnsmasq.conf, /tmp/resolv.conf.auto, /sbin/dnsmasq, /usr/sbin/dnsmasq, and /var/log/messages*. Overall, the repository’s purpose is QA/security validation of dnsmasq patch status and exploitability in live devices, especially routers or embedded Linux systems using dnsmasq as a DNS forwarder.JianrongXiao-Linksys · Disclosed Jun 1, 2026 · python · bash · network · local · wirelessOperationalCVE20265172pocThis repository is a small standalone Python proof-of-concept for CVE-2026-5172 targeting dnsmasq. It contains two code files: server.py, which implements a malicious UDP DNS server that returns a crafted SRV response with an intentionally inconsistent RDLEN field, and query_client.py, which sends raw DNS queries to a dnsmasq instance to drive the vulnerable parsing path. The included README.md and dnsmasq.conf show how to configure dnsmasq to forward queries to the malicious upstream server. The exploit flow is: the client sends an SRV query to dnsmasq; dnsmasq forwards upstream; the malicious server replies with an SRV answer whose declared RDLEN is smaller than the actual RDATA length (actual RDATA is 8 bytes, default declared length is 6); dnsmasq then processes the malformed response, attempting to reproduce the claimed buffer overflow in extract_addresses(). Repository structure is minimal and purpose-built: README.md provides setup steps, dnsmasq.conf provides sample forwarding configuration, query_client.py is the trigger client, and server.py is the malformed-response generator. There is no post-exploitation payload, shell, persistence, or framework integration. This is a network-based PoC intended to reproduce a parser/memory corruption condition rather than deliver a secondary payload.lottiedeyan · Disclosed May 27, 2026 · python · markdown · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
ThekelleysDnsmasqapplication
FAQ

Frequently asked questions

Is CVE-2026-5172 exploited in the wild?
As of Nov 10, 2026, Mallory has no reports of CVE-2026-5172 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2026-5172?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2026-5172, the earliest disclosed May 27, 2026.
Is there a patch for CVE-2026-5172?
Upgrade to dnsmasq 2.92rel2, which includes backported fixes, or version 2.93 or a later supported release. Alternatively, install a vendor package explicitly fixing CVE-2026-5172; corrected RHEL builds include 2.90-7.el10_2 and, for RHEL 10.0 extended-support offerings, 2.90-4.el10_0.1.
What products are affected by CVE-2026-5172?
Thekelleys Dnsmasq.
How severe is CVE-2026-5172?
CVE-2026-5172 has a CVSS v3.1 score of 7.5 (High) and an EPSS score of 2.7% (86th percentile) as of Nov 10, 2026.
Activity feed

Recent activity

19 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
tenable nessus pluginsNews · Nov 7, 2026EulerOS Virtualization 2.15.0 : dnsmasq (EulerOS-SA-2026-4690) | Tenable®A malformed DNS response can cause dnsmasq's extract_name() function to advance a pointer beyond a record boundary, triggering a heap out-of-bounds read and crash in extract_addresses(). The advisory identifies affected dnsmasq packages on EulerOS Virtualization 2.15.0. Exploit availability is reported for the grouped advisory but is not individually attributed to this CVE.Read more ↗tenable nessus pluginsNews · Nov 7, 2026EulerOS Virtualization 2.15.1 : dnsmasq (EulerOS-SA-2026-4632) | Tenable®Malformed DNS responses can cause pointer advancement beyond a record boundary during dnsmasq address extraction, triggering a heap out-of-bounds read and a crash.Read more ↗tenable nessus pluginsNews · Oct 30, 2026RHEL 10 : dnsmasq (RHSA-2026:92677) | Tenable®An out-of-bounds read in dnsmasq's extract_addresses() function triggered by a malformed rdlen value. Updated packages are available for RHEL 10. The plugin's collective exploit-availability statement does not establish exploit availability for this specific CVE.Read more ↗redhat accessNews · Oct 29, 2026RHSA-2026:92677 - Security Advisory - Red Hat Customer PortalAn out-of-bounds read in dnsmasq's extract_addresses() function involving a malformed rdlen value. Red Hat advisory RHSA-2026:92677 supplies a fix in dnsmasq-2.90-4.el10_0.1. The content does not specify exploitation activity or the resulting security impact.Read more ↗
+7 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity5Community discussion across Reddit, Mastodon, and other social sources.