CVE Alert: CVE-2025-12198 – n/a – dnsmasq

CVE-2025-12198

HIGHNo exploitation known

A vulnerability has been found in dnsmasq up to 2.73rc6. Affected is the function parse_hex of the file src/util.c of the component Config File Handler. The manipulation of the argument i leads to heap-based buffer overflow. Local access is required to approach this attack. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

CVSS v3.1 (7.8)
Vendor
n/a
Product
dnsmasq
Versions
2.73rc1 | 2.73rc2 | 2.73rc3 | 2.73rc4 | 2.73rc5 | 2.73rc6
CWE
CWE-122, Heap-based Buffer Overflow
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:P/RL:X/RC:R
Published
2025-10-27T00:58:12.511Z
Updated
2025-10-27T00:58:12.511Z

AI Summary Analysis

Risk verdict

High risk: publicly disclosed exploit exists for dnsmasq, with local-access prerequisites and high impact on confidentiality, integrity, and availability.

Why this matters

Dnsmasq is widely deployed in routers, gateways, and embedded devices, often exposed to trusted networks. An attacker with local access can trigger a heap-based overflow in the Config File Handler, potentially gaining code execution or causing service disruption without user interaction. The combination of a public exploit and high impact elevates urgency for affected environments.

Most likely attack path

An attacker who already has local access crafts input data fed to the Config File Handler (parse_hex) to overflow the heap. The exploit does not require user interaction and works against privileged processes, enabling potential code execution on the host. Lateral movement is plausible only if the compromised host offers network-facing services, but the vulnerability itself is local-to-host (Scope not expanding beyond the device).

Who is most exposed

Devices relying on dnsmasq—particularly routers, IoT gateways, and other network appliances in consumer and SMB environments—are most at risk, especially where dnsmasq processes untrusted config data or DHCP-provided inputs.

Detection ideas

  • Logs or crash dumps from dnsmasq indicating heap corruption or segmentation faults.
  • Unusual memory usage or repeated crashes tied to config parsing events.
  • Known exploit signatures or IOC patterns from public advisories.
  • Anomalous config-file activity on devices running dnsmasq.

Mitigation and prioritisation

  • Apply patched dnsmasq releases or vendor-supplied updates that fix the heap overflow.
  • Restrict local access to devices running dnsmasq; disable or isolate dnsmasq on interfaces exposed to untrusted networks where feasible.
  • Implement strict input controls for any data parsed by Config File Handler; consider validating or sanitising hex data prior to processing.
  • Enable and monitor crash reporting and auto-recovery logs; deploy vendor advisories promptly.
  • If no patch is available, consider temporary mitigations such as disabling the vulnerable feature or migrating to a different DNS service on affected devices.

Support Our Work

A considerable amount of time and effort goes into maintaining this website, creating backend automation and creating new features and content for you to make actionable intelligence decisions. Everyone that supports the site helps enable new functionality.

If you like the site, please support us on Patreon or Buy Me A Coffee using the buttons below.

AI APIs OSINT driven New features