Vulnerabilities/CVE-2020-25681, published 20 January 2021

CVE-2020-25681: dnsmasq DNSSEC RRSet sorting heap buffer overflow

Thekelleys, Dnsmasq

dnsmasq before 2.83 contains a heap-based buffer overflow in the code that sorts RRSets before DNSSEC validation. An attacker on the network who can forge DNS replies that are accepted as valid can overflow heap memory with arbitrary data, potentially leading to code execution. The flaw affects confidentiality, integrity and availability of the host running dnsmasq.

  • 8.1 CVSS 3.1 High
  • EPSS 88%, top 0.2%
  • CWE-122, Heap-based buffer overflow

Description

A flaw was found in dnsmasq before version 2.83. A heap-based buffer overflow was discovered in the way RRSets are sorted before validating with DNSSEC data. An attacker on the network, who can forge DNS replies such as that they are accepted as valid, could use this flaw to cause a buffer overflow with arbitrary data in a heap memory segment, possibly executing code on the machine. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

High priorityCVSS 8.1 with high confidentiality, integrity and availability impact and a very high EPSS score, though exploitation requires the harder condition of forged replies being accepted as valid and no KEV listing exists.

What it is

dnsmasq before 2.83 contains a heap-based buffer overflow in the code that sorts RRSets before DNSSEC validation. An attacker on the network who can forge DNS replies that are accepted as valid can overflow heap memory with arbitrary data, potentially leading to code execution. The flaw affects confidentiality, integrity and availability of the host running dnsmasq.

Impact

An attacker able to inject forged DNS responses can corrupt heap memory with attacker-controlled data, potentially achieving remote code execution on the dnsmasq host. Even without code execution, the overflow can crash or destabilize the resolver, affecting availability.

Attack surface

Reachable over the network via DNS traffic (AV:N) with no privileges or user interaction required (PR:N, UI:N), but exploitation requires conditions that make forged replies accepted as valid, reflected in the high attack complexity (AC:H). The vulnerable path is DNSSEC validation of sorted RRSets, so deployments using DNSSEC are the relevant exposure.

Exploitation

Not listed in CISA KEV and no ransomware associations are recorded, but EPSS is very high (0.812, ~99.6th percentile), indicating strong predicted exploitation likelihood. References include a vendor patch and the public DNSPooq disclosure, but the record does not state that a working exploit is publicly available.

What to do

  • Upgrade dnsmasq to version 2.83 or later; apply the vendor patch referenced in the Red Hat bug and distribution advisories.
  • Apply the Debian, Fedora and Gentoo security updates for affected packages.
  • Restrict DNS resolver exposure to trusted networks and clients where possible, reducing the pool of attackers able to inject forged replies.
  • Where DNSSEC validation is not required, consider disabling it to remove the vulnerable code path, and monitor vendor guidance.
  • Track upstream dnsmasq releases and re-check for follow-up fixes to the DNSSEC RRSet handling.

Detection

  • Monitor dnsmasq process crashes, restarts or abnormal termination, which may indicate a triggered heap overflow.
  • Watch for memory corruption indicators in dnsmasq logs or host-level crash dumps and core files.
  • Hunt for anomalous or spoofed DNS response patterns reaching resolvers, especially responses that pass DNSSEC validation unexpectedly.
  • Audit dnsmasq versions across the estate to identify hosts still running releases before 2.83.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

3 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2020-25681 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2009-0846Mit kerberos 5 vulnerabilityThe asn1_decode_generaltime function in lib/krb5/asn.1/asn1_decode.c in the ASN.1 GeneralizedTime decoder in MIT Kerberos 5 (aka krb5) before 1.6.4 a…EPSS 8.9%10.0CVE-2000-0844Caldera openlinux ebuilder permissions and access controls vulnerabilitySome functions that implement the locale subsystem on Unix do not properly cleanse user-injected format strings, which allows local attackers to exec…EPSS 16%10.0CVE-2000-0666Conectiva linux vulnerabilityrpc.statd in the nfs-utils package in various Linux distributions does not properly cleanse untrusted format strings, which allows remote attackers t…EPSS 26%10.0CVE-2000-0584Debian linux vulnerabilityBuffer overflow in Canna input system allows remote attackers to execute arbitrary commands via an SR_INIT command with a long user name or group nam…EPSS 5.9%10.0CVE-2000-1221Sgi irix vulnerabilityThe line printer daemon (lpd) in the lpr package in multiple Linux operating systems authenticates by comparing the reverse-resolved hostname of the …EPSS 17%10.0CVE-1999-0832Debian linux vulnerabilityBuffer overflow in NFS server on Linux allows attackers to execute commands via a long pathname.EPSS 3.5%10.0CVE-1999-0730Debian linux vulnerabilityThe zsoelim program in the Debian man-db package allows local users to overwrite files via a symlink attack.EPSS 4.5%10.0CVE-1999-0368Proftpd project proftpd vulnerabilityBuffer overflows in wuarchive ftpd (wu-ftpd) and ProFTPD lead to remote root access, a.k.a. palmetto.EPSS 40%

Source: NIST National Vulnerability Database (record CVE-2020-25681), CISA KEV, FIRST EPSS (scores of 2026-12-04). This page is refreshed as NVD updates the record.