cbcvebase.
CVE-2020-25687
published 2021-01-20

CVE-2020-25687: A flaw was found in dnsmasq before version 2.83. A heap-based buffer overflow was discovered in dnsmasq when DNSSEC is enabled and before it validates the…

PriorityP351medium5.9CVSS 3.1
AVNACHPRNUINSUCNINAH
EPSS
86.69%
99.7th percentile
A flaw was found in dnsmasq before version 2.83. A heap-based buffer overflow was discovered in dnsmasq when DNSSEC is enabled and before it validates the received DNS entries. This flaw allows a remote attacker, who can create valid DNS replies, to cause an overflow in a heap-allocated memory. This flaw is caused by the lack of length checks in rfc1035.c:extract_name(), which could be abused 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. The highest threat from this vulnerability is to system availability.

Affected

18 ranges
VendorProductVersion rangeFixed in
debiandebian_linux
debiandebian_linux
debiandnsmasq< dnsmasq 2.83-1 (bookworm)dnsmasq 2.83-1 (bookworm)
fedoraprojectfedora
fedoraprojectfedora
msrccm1_dnsmasq_2.85-1_on_cbl_mariner_1.0
thekelleysdnsmasq< 2.832.83
thekelleysdnsmasq
thekelleysdnsmasq>= 0 < 2.83-12.83-1
thekelleysdnsmasq>= 0 < 2.83-12.83-1
thekelleysdnsmasq>= 0 < 2.83-12.83-1
thekelleysdnsmasq>= 0 < 2.83-12.83-1
thekelleysdnsmasq>= 0 < 2.75-1ubuntu0.16.04.72.75-1ubuntu0.16.04.7
thekelleysdnsmasq>= 0 < 2.75-1ubuntu0.16.04.82.75-1ubuntu0.16.04.8
thekelleysdnsmasq>= 0 < 2.79-1ubuntu0.22.79-1ubuntu0.2
thekelleysdnsmasq>= 0 < 2.79-1ubuntu0.32.79-1ubuntu0.3
thekelleysdnsmasq>= 0 < 2.80-1.1ubuntu1.22.80-1.1ubuntu1.2
thekelleysdnsmasq>= 0 < 2.80-1.1ubuntu1.32.80-1.1ubuntu1.3

Detection & IOCsextracted from sources · hover to see the quote

command--dnssec
  • Vulnerability is only triggerable when dnsmasq is compiled with HAVE_DNSSEC flag AND DNSSEC is enabled at runtime (e.g. via --dnssec option). Scope detection to DNSSEC-enabled dnsmasq instances only.
  • The exploit path requires an attacker to supply crafted DNS replies — monitor for unexpected or anomalous DNS responses reaching dnsmasq, particularly from upstream resolvers or via packet injection (ID/port guessing).
  • The vulnerable code path is in rfc1035.c:extract_name() leading to sort_rrset(); a dnsmasq crash (DoS) is the observable outcome — alert on unexpected dnsmasq process termination when DNSSEC is enabled.
  • If dnsmasq is configured as an Open Resolver (accepting queries from the whole Internet), exploitation requires no user interaction and can be performed at will — prioritise patching or DNSSEC disablement on open-resolver deployments.
  • This vulnerability is part of the DNSpooq disclosure set (January 19, 2021); correlate with other DNSpooq CVEs when triaging affected Cisco and other vendor products.
  • ·Versions of dnsmasq shipped with Red Hat Enterprise Linux 5, 6, and 7 are NOT affected because they are not compiled with DNSSEC support.
  • ·Fixed in dnsmasq 2.83; Debian packages fixed in 2.83-1 across bookworm, bullseye, forky, sid, and trixie.
  • ·The only known mitigation (short of patching) is to disable DNSSEC entirely by removing the --dnssec command line option or the dnssec option from the dnsmasq configuration file.

CVSS provenance

nvdv3.15.9MEDIUMCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
nvdv2.07.1HIGHAV:N/AC:M/Au:N/C:N/I:N/A:C
osv5.9MEDIUM
vendor_cisco8.1HIGH
vendor_debian5.9MEDIUM
vendor_msrc5.9MEDIUM
vendor_redhat5.9MEDIUM
vendor_ubuntu3.7LOW
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.