# CVE-2018-5732: A specially constructed response from a malicious server can cause a buffer overflow in dhclient

> A malicious DHCP server can cause a buffer overflow and crash in the ISC DHCP client by sending specially crafted options.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Oct 2019
- **Updated:** 16 Sep 2024
- **Also known as:** ALPINE-CVE-2018-5732, DEBIAN-CVE-2018-5732, GHSA-j4cm-vph7-f7qg, UBUNTU-CVE-2018-5732

## What is CVE-2018-5732?

CVE-2018-5732 is a high-severity memory corruption vulnerability in ISC DHCP, published on 9 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Failure to properly bounds-check a buffer used for processing DHCP options allows a malicious server (or an entity masquerading as a server) to cause a buffer overflow (and resulting crash) in dhclient by sending a response containing a specially constructed options section. Affects ISC DHCP versions 4.1.0 -> 4.1-ESV-R15, 4.2.0 -> 4.2.8, 4.3.0 -> 4.3.6, 4.4.0

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

## Which versions are affected by CVE-2018-5732?

It affects 1 product.


Products: Isc Dhcp.

## How do I fix CVE-2018-5732?

Upgrade to a fixed version.

## Is CVE-2018-5732 being exploited?

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

## Other vulnerabilities in ISC DHCP

- [CVE-2009-0692](https://insights.sbomify.com/CVE-2009-0692/): Memory corruption in n/a (critical 10.0)
- [CVE-2011-0413](https://insights.sbomify.com/CVE-2011-0413/): Denial of service in n/a (high 7.8)
- [CVE-2009-1893](https://insights.sbomify.com/CVE-2009-1893/): Path traversal in n/a (medium 6.9)
- [CVE-2011-4868](https://insights.sbomify.com/CVE-2011-4868/): Null dereference in n/a (medium 6.1)
- [CVE-2012-3570](https://insights.sbomify.com/CVE-2012-3570/): Memory corruption in n/a (medium 5.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-5732 and fix it if it is affected.

What it is: CVE-2018-5732 is a high-severity memory corruption vulnerability in ISC DHCP, published on 9 Oct 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-5732 in the wild and no public exploit code.

Affected product: ISC DHCP. 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-2018-5732/ (Markdown: https://insights.sbomify.com/CVE-2018-5732/index.md)
```

## Sources

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

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