# CVE-2021-25217: A buffer overrun in lease file parsing code can be used to exploit a common vulnerability shared by dhcpd and dhclient

> A buffer overrun in ISC DHCP lease parsing allows attackers to crash the service or corrupt lease data, impacting network availability and integrity.

- **Severity:** High 7.4 (`CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 May 2021
- **Updated:** 16 Sep 2024
- **Also known as:** ALPINE-CVE-2021-25217, AZL-6372, CLSA-2021-1623075541, CLSA-2021-1634922551, CLSA-2021-1635459208, DEBIAN-CVE-2021-25217, DLA-2674-1, GHSA-pf98-cx5w-r49r, MGASA-2021-0307, OESA-2021-1226, RHSA-2021:2357, RHSA-2021:2359, RHSA-2021:2405, RHSA-2021:2414, RHSA-2021:2415, RHSA-2021:2416, RHSA-2021:2418, RHSA-2021:2419, RHSA-2021:2420, RHSA-2021:2469, RLSA-2021:2359, SUSE-SU-2021:14740-1, SUSE-SU-2021:1822-1, SUSE-SU-2021:1841-1, UBUNTU-CVE-2021-25217, USN-4969-1, USN-4969-2, openSUSE-SU-2021:0834-1, openSUSE-SU-2021:1841-1

## What is CVE-2021-25217?

CVE-2021-25217 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 26 May 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In ISC DHCP 4.1-ESV-R1 -> 4.1-ESV-R16, ISC DHCP 4.4.0 -> 4.4.2 (Other branches of ISC DHCP (i.e., releases in the 4.0.x series or lower and releases in the 4.3.x series) are beyond their End-of-Life (EOL) and no longer supported by ISC. From inspection it is clear that the defect is also present in releases from those series, but they have not been officially tested for the vulnerability), The outcome of encountering the defect while reading a lease that will trigger it varies, according to: the component being affected (i.e., dhclient or dhcpd) whether the package was built as a 32-bit or 64-bit binary whether the compiler flag -fstack-protection-strong was used when compiling In dhclient, ISC has not successfully reproduced the error on a 64-bit system. However, on a 32-bit system it is possible to cause dhclient to crash when reading an improper lease, which could cause network connectivity problems for an affected system due to the absence of a running DHCP client process. In dhcpd, when run in DHCPv4 or DHCPv6 mode: if the dhcpd server binary was built for a 32-bit architecture AND the -fstack-protection-strong flag was specified to the compiler, dhcpd may exit while parsing a lease file containing an objectionable lease, resulting in lack of service to clients. Additionally, the offending lease and the lease immediately following it in the lease database may be improperly deleted. if the dhcpd server binary was built for a 64-bit architecture OR if the -fstack-protection-strong compiler flag was NOT specified, the crash will not occur, but it is possible for the offending lease and the lease which immediately followed it to be improperly deleted.

Weakness: CWE-119 (Improper Restriction of Operations within the Bounds of a Memory Buffer)

## Which versions are affected by CVE-2021-25217?

It affects 16 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `dhclient` | Red Hat:enterprise_linux:7::client | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp` | Red Hat:enterprise_linux:7::client | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-common` | Red Hat:enterprise_linux:7::client | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-devel` | Red Hat:enterprise_linux:7::client | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-libs` | Red Hat:enterprise_linux:7::client | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp` | Red Hat:enterprise_linux:7::computenode | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-devel` | Red Hat:enterprise_linux:7::computenode | All versions | 12:4.2.5-83.el7_9.1 |
| `dhclient` | Red Hat:enterprise_linux:7::server | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp` | Red Hat:enterprise_linux:7::server | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-common` | Red Hat:enterprise_linux:7::server | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-devel` | Red Hat:enterprise_linux:7::server | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-libs` | Red Hat:enterprise_linux:7::server | All versions | 12:4.2.5-83.el7_9.1 |
| `dhclient` | Red Hat:enterprise_linux:7::workstation | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp` | Red Hat:enterprise_linux:7::workstation | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-common` | Red Hat:enterprise_linux:7::workstation | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-devel` | Red Hat:enterprise_linux:7::workstation | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp-libs` | Red Hat:enterprise_linux:7::workstation | All versions | 12:4.2.5-83.el7_9.1 |
| `dhcp` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-client` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-client-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-common` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-libs` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-libs-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-relay` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-relay-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-server` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhcp-server-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 12:4.3.6-44.el8_4.1 |
| `dhclient` | Red Hat:rhel_aus:7.2::server | All versions | 12:4.2.5-42.el7_2.2 |
| `dhcp` | Red Hat:rhel_aus:7.2::server | All versions | 12:4.2.5-42.el7_2.2 |
| `dhcp-common` | Red Hat:rhel_aus:7.2::server | All versions | 12:4.2.5-42.el7_2.2 |
| `dhcp-debuginfo` | Red Hat:rhel_aus:7.2::server | All versions | 12:4.2.5-42.el7_2.2 |
| `dhcp-devel` | Red Hat:rhel_aus:7.2::server | All versions | 12:4.2.5-42.el7_2.2 |
| `dhcp-libs` | Red Hat:rhel_aus:7.2::server | All versions | 12:4.2.5-42.el7_2.2 |
| `dhclient` | Red Hat:rhel_aus:7.3::server | All versions | 12:4.2.5-47.el7_3.2 |

Products: Debian Debian Linux, Fedoraproject Fedora, Isc Dhcp, Netapp Ontap Select Deploy Administration Utility, Netapp Solidfire \& Hci Management Node, Siemens Ruggedcom Rox Mx5000 Firmware, Siemens Ruggedcom Rox Rx1400 Firmware, Siemens Ruggedcom Rox Rx1500 Firmware, Siemens Ruggedcom Rox Rx1501 Firmware, Siemens Ruggedcom Rox Rx1510 Firmware, Siemens Ruggedcom Rox Rx1511 Firmware, Siemens Ruggedcom Rox Rx1512 Firmware, Siemens Ruggedcom Rox Rx1524 Firmware, Siemens Ruggedcom Rox Rx1536 Firmware, Siemens Ruggedcom Rox Rx5000 Firmware, Siemens Sinec Ins.

## How do I fix CVE-2021-25217?

Apply the vendor's patch.

## Is CVE-2021-25217 being exploited?

There is no known exploitation of CVE-2021-25217 in the wild and no public exploit code.

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-25217 and fix it if it is affected.

What it is: CVE-2021-25217 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 26 May 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-25217 in the wild and no public exploit code.

Affected product: Debian Debian Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-25217/ (Markdown: https://insights.sbomify.com/CVE-2021-25217/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-25217
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-25217
- OSV: https://osv.dev/vulnerability/CVE-2021-25217

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-25217/
Summaries are generated and may contain mistakes; the official description above is the record.
