CVE-2021-25216

A second vulnerability in BIND's GSSAPI security policy negotiation can be targeted by a buffer overflow attack

8.1 high EPSS 82.9%

Published 29 Apr 2021 Updated 16 Sep 2024 CNA: isc

Check your servers for CVE-2021-25216

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-25216 affects bind9, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

In BIND 9.5.0 -> 9.11.29, 9.12.0 -> 9.16.13, and versions BIND 9.11.3-S1 -> 9.11.29-S1 and 9.16.8-S1 -> 9.16.13-S1 of BIND Supported Preview Edition, as well as release versions 9.17.0 -> 9.17.1 of the BIND 9.17 development branch, BIND servers are vulnerable if they are running an affected version and are configured to use GSS-TSIG features. In a configuration which uses BIND's default settings the vulnerable code path is not exposed, but a server can be rendered vulnerable by explicitly setting values for the tkey-gssapi-keytab or tkey-gssapi-credential configuration options. Although the default configuration is not vulnerable, GSS-TSIG is frequently used in networks where BIND is integrated with Samba, as well as in mixed-server environments that combine BIND servers with Active Directory domain controllers. For servers that meet these conditions, the ISC SPNEGO implementation is vulnerable to various attacks, depending on the CPU architecture for which BIND was built: For named binaries compiled for 64-bit platforms, this flaw can be used to trigger a buffer over-read, leading to a server crash. For named binaries compiled for 32-bit platforms, this flaw can be used to trigger a server crash due to a buffer overflow and possibly also to achieve remote code execution. We have determined that standard SPNEGO implementations are available in the MIT and Heimdal Kerberos libraries, which support a broad range of operating systems, rendering the ISC implementation unnecessary and obsolete. Therefore, to reduce the attack surface for BIND users, we will be removing the ISC SPNEGO implementation in the April releases of BIND 9.11 and 9.16 (it had already been dropped from BIND 9.17). We would not normally remove something from a stable ESV (Extended Support Version) of BIND, but since system libraries can replace the ISC SPNEGO implementation, we have made an exception in this case for reasons of stability and security.

Severity (CVSS)

8.1 high CVSS 3.1 from isc (CNA)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
network: an attacker can reach the vulnerable part over the network, often from the internet
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Privileges required
none: the attacker does not need an account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 82.9%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 99.6% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
BIND9
affected Open Source Branches 9.5 though 9.11 9.5.0 through versions before 9.11.31
affected Open Source Branches 9.12 though 9.16 9.12.0 through versions before 9.16.14
affected Supported Preview Branch 9.11-S 9.11.3-S1 through versions before 9.11.31-S1
affected Supported Preview Branch 9.16-S 9.16.8-S1 through versions before 9.16.14-S1
affected Development Branch 9.17 9.17.0 through versions before 9.17.2

Is my server affected?

Find the installed version of bind9 and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i bind9
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-25216 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-25216

RHEL, Rocky, Alma, Fedora

rpm -q bind9
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-25216

Alpine

apk list --installed | grep -i bind9

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2021-25216
trivy image --scanners vuln IMAGE | grep CVE-2021-25216

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Other references

Source: the record CVE-2021-25216 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.