Security Advisory

CVE-2020-25687: dnsmasq DNSSEC sort_rrset Overflow

Last updated:
  • CVE-2020-25687

CVE-2020-25687 is a heap-based buffer overflow in the DNSSEC code of dnsmasq before 2.83: a forged DNS reply makes sort_rrset() copy with a negative length and crash dnsmasq. NVD scores it 5.9, and EPSS ranks it near the top. It needs DNSSEC compiled in and enabled; Digi, NETGEAR and Cradlepoint list affected devices.

Vulnerability summary

CVSS base score

5.9

Medium severity

EPSS score (FIRST)

94.0%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2020-25687 · Source: NVD

Affected components

ComponentCPEVersion range
dnsmasq (DNSSEC validation, rfc1035.c extract_name / sort_rrset)cpe:2.3:a:thekelleys:dnsmasq:*:*:*:*:*:*:*:*before 2.83, only with DNSSEC compiled in and enabled (NVD, dnsmasq CHANGELOG 2.83)
Digi International DAL-based routers and gateways—fixed in firmware 21.2.x (CERT/CC VU#434904)
NETGEAR RAX40 and RAX35—firmware before v1.0.3.88 (CERT/CC VU#434904, PSV-2020-0463)
Cradlepoint NetCloud OS (NCOS)—up to 7.21.20; DNSSEC disabled by default (CERT/CC VU#434904)
OpenWrt dnsmasq-full package—OpenWrt 19.07.0 to 19.07.5; fixed in 19.07.6 (OpenWrt advisory 2021-01-19-1)

What does this mean for affected devices?

CVE-2020-25687 is a heap-based buffer overflow (CWE-122) in dnsmasq's DNSSEC code. NVD's description matches CVE-2020-25683 except for the function. A remote attacker "who can create valid DNS replies" can exploit "the lack of length checks in rfc1035.c:extract_name()" to make the code "execute memcpy() with a negative size in sort_rrset() and cause a crash in dnsmasq, resulting in a denial of service." NVD scores it 5.9 (medium), vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, for dnsmasq before 2.83 (NVD).

The dnsmasq CHANGELOG for 2.83 fixes it together with CVE-2020-25681, -25682 and -25683 and says "Any dnsmasq with DNSSEC compiled in and enabled is vulnerable to this." The dnsmasq man page adds that --dnssec requires dnsmasq to be compiled with HAVE_DNSSEC and given trust anchors. So there are two separate checks: the build and the configuration.

The vendor statements collected in CERT/CC VU#434904 show which device makers shipped DNSSEC-capable dnsmasq:

  • Digi International: patched in firmware 21.2.x on all DAL-based products, including the Digi IX10, IX14, IX15, IX20, EX12, EX15, TX54, TX64 and LR54 routers and the Connect EZ, ConnectIT and AnywhereUSB Plus products.
  • NETGEAR: RAX40 and RAX35 Wi-Fi routers before firmware v1.0.3.88 (advisory PSV-2020-0463).
  • Cradlepoint: NetCloud OS up to 7.21.20. DNSSEC is disabled by default; Cradlepoint rates the DNSSEC CVEs Medium/High once it is enabled.
  • OpenWrt: only dnsmasq-full, the one variant built with DNSSEC; OpenWrt 19.07.0 to 19.07.5 affected and fixed in 19.07.6 per its advisory 2021-01-19-1.
  • Not affected: Arista, Check Point, Cisco, Juniper, Siemens, Sophos and Synology. Cisco's advisory says no Cisco product was found affected by the four DNSSEC CVEs.

EPSS and reachability point in opposite directions here. FIRST EPSS gives CVE-2020-25687 0.940, the 99.8th percentile, in the 2026-11-16 dataset (FIRST EPSS), the highest score in the DNSpooq set. Yet on a build without DNSSEC the vulnerable function never runs. Our dnsmasq vulnerabilities in embedded firmware guide works through this case. It shows how to read DNSSEC or no-DNSSEC from the compile-options string, check the dnssec setting, and record a VEX "not affected" decision with that evidence. The other DNSSEC overflows, CVE-2020-25681 and CVE-2020-25683, take the same triage.

CVE-2020-25687 is not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13) (CISA KEV).

To fix it, upgrade to dnsmasq 2.83 or later, or install the vendor firmware listed above. The Debian Security Tracker shows backports in 2.80-1+deb10u1 for buster (DSA-4844-1) and 2.76-5+deb9u3 for stretch (DLA-2604-1). Until then, switching DNSSEC validation off in dnsmasq removes the code path, at the cost of validation. Our memory corruption fix guide covers heap overflows as a class.

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • Heap overflow when DNSSEC is enabled; lack of length checks in rfc1035.c:extract_name() leads to memcpy() with negative size in sort_rrset(); crash; CVSS 3.1 5.9; CWE-122; before 2.83. — NVD
  • 2.83: any dnsmasq with DNSSEC compiled in and enabled is vulnerable to CVE-2020-25681, -25682, -25683, -25687. — dnsmasq CHANGELOG
  • --dnssec requires HAVE_DNSSEC at compile time and DNSSEC trust anchors. — dnsmasq man page
  • Digi 21.2.x DAL products, NETGEAR RAX40/RAX35 < v1.0.3.88, Cradlepoint NCOS up to 7.21.20 affected; OpenWrt dnsmasq-full only; Arista, Check Point, Cisco, Juniper, Siemens, Sophos, Synology not affected. — CERT/CC VU#434904
  • No Cisco products found affected by the four DNSSEC CVEs. — Cisco Security Advisory cisco-sa-dnsmasq-dns-2021-c5mrdf3g
  • 19.07.0-19.07.5 dnsmasq-full affected, fixed in 19.07.6. — OpenWrt Security Advisory 2021-01-19-1
  • Fixed in buster 2.80-1+deb10u1 (DSA-4844-1) and stretch 2.76-5+deb9u3 (DLA-2604-1). — Debian Security Tracker
  • Not in the CISA KEV catalog as of 2026-11-17 (catalog version 2026.11.13). — CISA KEV
  • EPSS 0.940 (99.8th percentile), dataset 2026-11-16, read 2026-11-17. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. CERT/CC VU#434904 (DNSpooq)
  3. Cisco Security Advisory: DNSpooq vulnerabilities in dnsmasq
  4. OpenWrt Security Advisory 2021-01-19-1: dnsmasq multiple vulnerabilities
  5. dnsmasq CHANGELOG
  6. dnsmasq man page
  7. Debian Security Tracker
  8. CISA KEV
  9. FIRST EPSS

Frequently asked questions

How do I tell whether CVE-2020-25687 applies to my firmware?

Check two things: whether the dnsmasq binary was compiled with DNSSEC (the compile-options string shows DNSSEC or no-DNSSEC) and whether the dnssec option is enabled in its configuration. The CVE needs both (per the dnsmasq CHANGELOG and man page).

Why is the EPSS score of CVE-2020-25687 so high?

EPSS estimates exploitation activity across all dnsmasq installations and does not know whether DNSSEC is enabled on a given device. FIRST EPSS gives it 0.940 in the 2026-11-16 dataset (per FIRST EPSS).

Which vendors report devices affected by CVE-2020-25687?

Digi International, NETGEAR (RAX40 and RAX35), Cradlepoint, Sierra Wireless and OpenWrt's dnsmasq-full package. Cisco, Siemens and Juniper report no affected products (per CERT/CC VU#434904).

Is CVE-2020-25687 in the CISA KEV catalog?

No, not as of 2026-11-17 (catalog version 2026.11.13) (per CISA KEV).