CVE-2026-4892
Executive Summary
CVE-2026-4892 is a heap-based out-of-bounds write vulnerability in the DHCPv6 implementation of dnsmasq. The flaw allows a local attacker to execute arbitrary code with root privileges by crafting a malicious DHCPv6 packet, taking advantage of dnsmasq's typical execution as a privileged daemon. The vulnerability carries a CVSS score of 8.4, reflecting the high confidentiality, integrity, and availability impact despite the local attack vector. A confirmed patch exists across multiple independent sources, but attackers who have not yet updated dnsmasq on deployed systems remain exposed to potential privilege escalation and full system compromise.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Technical Analysis
The vulnerability is a heap-based out-of-bounds write classified as CWE-122. It resides in the DHCPv6 parser/processing logic of dnsmasq. When dnsmasq receives a DHCPv6 message, the packet is parsed into its constituent options. An out-of-bounds write in the heap implies that during the parsing or copying of option data, the code writes past the end of an allocated buffer on the heap without an adequate bounds check.
The precise nature of the flaw — e.g., which specific option type, field offset, or length computation is miscalculated — is not disclosed in the available CVE description. The description states only that the flaw is triggered "via a crafted DHCPv6 packet." Because dnsmasq commonly runs with the --dhcp-range option to serve DHCPv6 leases, the vulnerable code path is only reachable on hosts that have DHCPv6 server functionality enabled. dnsmasq may be configured to bind port 547/UDP (DHCPv6 server) or port 546 (client), depending on deployment.
A "local attacker" in the CVSS vector (AV:L) typically means the attacker must already have some form of local access — e.g., a low-privileged user account or the ability to send packets to the loopback or local network interface — but does not require user interaction (UI:N) or prior privileges (PR:N). Because dnsmasq typically drops privileges to user "nobody" after binding, the term "root privileges" in the description refers to the fact that dnsmasq binds to privileged ports (<1024) and later may re-gain privileges for certain operations, or that the attacker escalates from local user to the privileges under which dnsmasq runs (often root at startup, then dropping to an unprivileged user but retaining CAP_NET_BIND_SERVICE). The write primitive grants the attacker control of the heap metadata, potentially enabling function-pointer overwrite or other code-execution techniques.
The heap write is a single-occurrence buffer overrun or a loop-based overflow, depending on how option parsing is implemented. In DHCPv6, options are TLV (type-length-value) encoded with a 16-bit length field. A common flaw class in such parsers is trusting the option length without verifying it against the remaining packet size or the allocated destination buffer, causing a heap overwrite. Given CVE-122 classification, the developer fails to validate that option_length ≤ remaining_buffer_size before a memcpy or similar operation.
Exploitation Scenarios
No public PoC or exploit code is available for CVE-2026-4892, and no Nuclei template has been published. The following attack chain is inferred from the vulnerability class (heap OOB write in a DHCPv6 parser), not from a public exploit.
Step 1 — Reconnaissance / target identification.
The attacker identifies a host running dnsmasq with DHCPv6 server enabled. This may be a home router, an embedded IoT device, a virtualized network appliance, or a Linux server acting as a DNS/DHCP gateway for a hypervisor (e.g., libvirt). On a local network, the attacker can scan for UDP port 547 (DHCPv6 server) or observe router advertisements that announce a DHCPv6 service. A local attacker might also enumerate running processes (ps aux | grep dnsmasq) to confirm the binary is present and to check for the --dhcp-range command-line flag.
Step 2 — Triggering the flaw.
Since the CVSS vector specifies a local attack vector (AV:L), the attacker either is already on the system (low-privileged user) or has the ability to send a multicast DHCPv6 packet to the link-local address ff02::1:2 on the directly-connected interface. The attacker crafts a DHCPv6 packet (SOLICIT or REQUEST message type) containing one or more options with malicious length fields or malformed sub-option stuctures. The packet must hit the vulnerable parsing routine — specifically by including an option whose declared length causes the parser to write past the bounds of a heap buffer.
Step 3 — Payload / execution method.
The heap out-of-bounds write corrupts adjacent heap objects. The attacker arranges the heap layout (via DHCP lease churn, DNS cache fills, or other heap grooming) so that the overflow overwrites a function pointer, a size field used by an allocator, or the contents of another object that gets dereferenced. Common exploitation strategies for dnsmasq heap overflows include overwriting a dhcp_packet structure, mangling a freelist pointer to achieve an arbitrary write, or corrupting a listen_fd structure to hijack control flow. Ultimately, the attacker redirects execution to shellcode or a ROP chain that executes with the privileges of the dnsmasq process — described in the CVE as "root privileges."
Step 4 — Post-exploitation impact.
With arbitrary code execution as root, the attacker can install persistent backdoors, read or tamper with any file, intercept network traffic, add SSH keys for remote access, disable security controls, or pivot to other hosts. On embedded routers, this grants full control over the firewall and network segmentation — enabling lateral movement to the entire LAN. Because dnsmasq is also a DNS forwarder, the attacker can manipulate DNS responses to redirect victims to malicious servers.
Note: No public PoC was available at the time of this report. The attack chain above is a class-level inference from CWE-122 (heap OOB write) combined with the DHCPv6 context. Insufficient technical detail exists in the public description to specify the exact option type or parsing routine that is vulnerable.
Impact Assessment
The CVSS score of 8.4 (High) results from:
- Attack Vector (AV:L): Local only — reduces the logistical exposure but does not eliminate it, as network services that bind to local interfaces are reachable by any local user.
- Attack Complexity (AC:L): Low — no special conditions or race windows needed; the packet can be sent directly.
- Privileges Required (PR:N): None — the attack does not require any prior privileged access.
- User Interaction (UI:N): None — the victim does not need to trigger anything.
- Confidentiality/Integrity/Availability (C:H/I:H/A:H): Full impact — arbitrary code execution with root privileges trivially yields total system compromise.
Business impact is most severe for organizations running dnsmasq as part of their network infrastructure, such as:
- Cloud/VM orchestration platforms (libvirt, OpenStack) where dnsmasq provides DHCP/DNS for guest VMs.
- Embedded IoT and router vendors whose firmware ships dnsmasq pre-installed and enabled by default.
- Edge gateways that forward DNS and DHCP on internal networks.
For such systems, a compromise of dnsmasq means a single low-privileged local actor (or a guest VM user) can compromise the hypervisor host. In container environments, a compromised container with access to the host's dnsmasq socket could break out. The blast radius extends to the entire network segment that the affected host bridges.
EPSS score of 0.00812 (54.6th percentile) indicates low but non-trivial exploitation likelihood in the wild; the vulnerability is not currently listed on the CISA KEV catalogue, but given the confirmed patch and the broad install base of dnsmasq, threat actors will likely incorporate this into exploit kits once details are fully public.
Detection Guidance
Sigma Rule
A Sigma rule for this vulnerability should target anomalous DHCPv6 packets that reach a dnsmasq host — specifically, malformed option length fields or packets that crash the daemon.
title: Suspicious DHCPv6 Option Length Anomaly Toward Local dnsmasq
id: 3c4f7e5b-d2a3-4b21-9a01-c1d2f3e4a5b6
status: experimental
description: Detects DHCPv6 packets traveling to a local dnsmasq service that contain option length values exceeding packet bounds, which may indicate CVE-2026-4892 heap overflow attempts.
logsource:
category: network_flow
product: linux
detection:
selection_packet_capture:
event.category: network_traffic
destination.port: 547
network.transport: udp
network.type: ipv6
selection_suspicious_contents:
# Placeholder that would match on protocol dissector outputs indicating
# truncated or overlength DHCPv6 options; actual field names depend on ECS mapping.
network.protocol: dhcpv6
condition: selection_packet_capture and selection_suspicious_contents
falsepositives:
- Legitimate misconfigured DHCPv6 clients sending malformed packets
level: high
tags:
- attack.privilege_escalation
- cve.2026.4892
- cwe.122
YARA Rule
The following YARA rule scans memory dumps or core files from a crashed dnsmasq process for heap corruption signatures or DHCPv6 option patterns.
rule CVE_2026_4892_dnsmasq_heap_OOB_write
{
meta:
author = "Valters IT Threat Intelligence"
description = "Detects heap corruption indicators and DHCPv6 option patterns in dnsmasq crash artifacts."
cve = "CVE-2026-4892"
cwe = "CWE-122"
date = "2026-01-01"
confidence = 60
strings:
$s_ia_na_opt = { 00 0c } // DHCPv6 IA_NA option type
$s_ia_addr_opt = { 00 05 } // DHCPv6 IAADDR option type
$s_dnsmasq_banner = "dnsmasq-" ascii
$s_heap_meta_glibc = "\x00\x00\x00\x00\x00\x00\x00\x00" // glibc heap chunk alignment fingerprints
$s_str_memcpy = "memcpy" ascii
$s_str_option = "option" ascii
condition:
uint16(0) == 0x0c01 and any of them
and filesize > 100KB
}
Suricata IDS Rule
A Suricata rule that flags DHCPv6 packets with option lengths exceeding the datagram's remaining length is appropriate.
alert udp any any -> any 547 (msg:"CVE-2026-4892 Potential DHCPv6 heap overflow attempt";
ip_proto:udp;
content:"|00 0c|"; depth:2; # DHCPv6 IA_NA option type at start of options region (approx)
dsize:>100;
metadata:created_at 2026_01_01, updated_at 2026_01_01;
metadata:cve CVE-2026-4892;
classtype:attempted-admin;
sid:20264892; rev:1;)
Note: Precise byte-level matching for DHCPv6 option parsing requires a dedicated protocol parser (e.g., a Lua script in Suricata) — a simple content match can only approximate the flaw trigger.
Elastic Detection
An EQL rule that looks for a process termination event of dnsmasq (heap corruption commonly yields an ABRT signal) followed by a new process execution of unusual binaries from the same user.
sequence with maxspan=30s
[ process where event.type == "end" and process.name == "dnsmasq" and signal.name in ("ABRT","SEGV","BUS") ]
[ process where event.type == "start" and user.id != "0" and parent.process.name == "dnsmasq" ]
Splunk SPL Query
Search for dnsmasq crashes and correlate with DHCPv6 traffic.
index=linux sourcetype=syslog OR sourcetype=json
earliest=-24h
| search "dnsmasq" AND ("dhcpv6" OR "DHCPV6" OR "packet")
| rename src_ip as src, dst_port as dport
| eval suspicious = if(dport==547 OR like(message,"%memcpy%") OR like(message,"%option%") OR like(message,"%corrupt%"),1,0)
| where suspicious==1
| stats count by src, dhost, message, _time
| sort - _time
| table _time, src, dhost, message
Wazuh OSSEC Rule
A local file rule to alert on dnsmasq termination signals or crash log entries.
<group name="dnsmasq,">
<rule id="100489" level="10" frequency="3" timeframe="60">
<if_sid>510</if_sid>
<match>dnsmasq: (abort|segmentation fault|signal|SIGSEGV|SIGABRT|heap corruption)</match>
<description>CVE-2026-4892: dnsmasq crash indicative of heap-overflow exploitation.</description>
<group>kerner_attack</group>
<mitre><id>T1068</id></mitre>
<options>no_full_log</options>
</rule>
</group>
Mitigation & Patch Guidance
Patch confidence is 4/4 — CONFIRMED — the fix is verified by NVD, CNA, OSV, Debian, and RHSA (Red Hat Security Advisory).
1) Immediate mitigations (if patching is not yet feasible):
- Disable DHCPv6 server on dnsmasq if not strictly required: remove the
--dhcp-rangeIPv6 entries (e.g.,--dhcp-range=::,constructor:br0,ra-only) from the configuration, or start dnsmasq with--dhcp-ignore=tag:known/--port=0to disable DHCP entirely. - Use a firewall (iptables/ip6tables/nftables) to block inbound UDP packets that are destined for port 547 from untrusted local interfaces.
- In virtualized/containerized environments, restrict the ability of guest VMs and containers to send DHCPv6 multicast packets to the host's link-local network by isolating the bridge or using MAC-spoofing protections.
- Run dnsmasq under a non-root user with
--user=dnsmasqif it is not already, though note the description indicates the vulnerable path results in root access; ensure the host can tolerate a full privilege-escalation compromise while applying other mitigations.
2) Patch / upgrade steps:
- Update to the newest dnsmasq release that includes the confirmed fix. Since the exact fixed version is not published in the available data, obtain the latest stable release from the official thekelleys.org.uk/dnsmasq/ page or your distribution's package repository.
- Debian users:
apt update && apt upgrade dnsmasq(Debian patch advisory referenced in the OSV entry). - Red Hat family: apply the appropriate RHSA errata for dnsmasq (refer to the RHSA reference listed).
- Embedded/router vendors: deploy the vendor-specific firmware update that incorporates the corrected dnsmasq build.
3) Long-term hardening:
- Track vendor advisories for dnsmasq regularly and subscribe to the OSV/NVD feeds for the project name.
- In production network infrastructure, run dnsmasq in read-only chroot (
--chroot=/var/lib/dnsmasq) and drop capabilities to the minimal set (--cap-add=-NET_RAWetc.) after startup. - Harden the local network Trusted Computing Base (TCB) so that any low-privileged local actor cannot reach daemon sockets or the network interface used for DHCPv6.
- Implement continuous detection using the Sigma/Suricata rules in this report to flag malformed DHCPv6 traffic.
References
- NVD Entry for CVE-2026-4892 — https://nvd.nist.gov/vuln/detail/CVE-2026-4892 (NVD description, CVSS 8.4, CWE-122, EPSS; patch confirmed)
- OSV Entry (CVE-2026-4892) — https://osv.dev/vulnerability/CVE-2026-4892 (patch reference; affected universe "/" 0→unfixed)
- Debian Security Tracker — https://security-tracker.debian.org/tracker/CVE-2026-4892 (downstream patch confirmation)
- Red Hat Security Advisory (RHSA) — https://access.redhat.com/security/cve/CVE-2026-4892 (RHSA errata for dnsmasq packages)
- dnsmasq official site — https://thekelleys.org.uk/dnsmasq/ (for obtaining patched source/release)
Threat-actor and in-the-wild evidence: No known campaigns, exploit code, or evidence of in-the-wild exploitation was identified at the time of writing. The vulnerability is not present on the CISA Known Exploited Vulnerabilities (KEV) catalogue. EPSS percentile of 54.6% suggests that while not top-ranked, the flaw is well within the range of CVEs actively exploited within weeks of disclosure, especially given the confirmed root-code-execution potential and the ubiquity of dnsmasq in routers and hypervisors. Security teams should treat this as high-priority for patching regardless of the absence of public PoCs.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.