CVEfocus › CVE database › CVE-2026-12725

CVE-2026-12725Dnsmasq: dnsmasq: heap buffer overflow in log_query() when logging unsupported ds/dnskey…

CVSS 5.9 MediumEPSS 0.5% (higher than 38% of CVEs)Published 2026-06-22Updated 2026-11-24Assigner: redhat

A heap-based buffer overflow was found in dnsmasq. When DNSSEC validation and query logging are both enabled, logging of DS or DNSKEY replies containing unsupported algorithm or digest types can cause dnsmasq to write past the end of an internal logging buffer. A remote attacker able to supply such a DNS response may crash the dnsmasq process, resulting in denial of service.

CWE-122

What to do

Fixed builds are available from Debian, Ubuntu: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

5Fixed
10Fix pending
1Will not fix
4Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04dnsmasqFixed2.92-1ubuntu0.4UBUNTU-CVE-2026-12725
Ubuntu 25.10dnsmasqWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-12725
Ubuntu 24.04dnsmasqFixed2.90-2ubuntu0.4UBUNTU-CVE-2026-12725
Ubuntu 22.04dnsmasqFixed2.90-0ubuntu0.22.04.4UBUNTU-CVE-2026-12725
Ubuntu 20.04dnsmasqFix pending2.90-0ubuntu0.20.04.1+esm3 (Ubuntu Pro)UBUNTU-CVE-2026-12725
Ubuntu 18.04dnsmasqFix pending2.90-0ubuntu0.18.04.1+esm4 (Ubuntu Pro)UBUNTU-CVE-2026-12725
Ubuntu 16.04dnsmasqFix pending2.90-0ubuntu0.16.04.1+esm4 (Ubuntu Pro)UBUNTU-CVE-2026-12725
Debian 14dnsmasqFixed2.93-1DEBIAN-CVE-2026-12725
Debian 13dnsmasqFixed2.91-1+deb13u2DEBIAN-CVE-2026-12725
Debian 12dnsmasqFix pendingDEBIAN-CVE-2026-12725
Red Hat Enterprise Linux 10dnsmasqFix pending
Fix deferred
Red Hat Enterprise Linux 10dnsmasq-utilsFix pending
Fix deferred
Red Hat Enterprise Linux 9dnsmasqFix pending
Fix deferred
Red Hat Enterprise Linux 9dnsmasq-utilsFix pending
Fix deferred
Red Hat Enterprise Linux 8dnsmasqFix pending
Fix deferred
Red Hat Enterprise Linux 8dnsmasq-utilsFix pending
Fix deferred
Red Hat Enterprise Linux 7dnsmasqNot affected
Red Hat Enterprise Linux 7dnsmasq-utilsNot affected
Red Hat Enterprise Linux 6dnsmasqNot affected
Red Hat Enterprise Linux 6dnsmasq-utilsNot affected

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Mitigate this issue by updating to a version of dnsmasq that includes the upstream fix (commit 36d081e37477027fd721fea498f3760f529034ad), or by disabling query logging if DNSSEC validation must remain enabled. After changing the configuration, restart the dnsmasq service for the changes to take effect.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.