Cyber Posture

CVE-2026-42512

High

Published: 30 April 2026

Published
30 April 2026
Modified
01 May 2026
KEV Added
Patch
CVSS Score 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0012 30.0th percentile
Risk Priority 16 60% EPSS · 20% KEV · 20% CVSS

Description

As dhclient is building an environment to pass to dhclient-script, it may need to resize the array of string pointers. The code which expands the array incorrectly calculates its new size when requesting memory, resulting in a heap buffer overrun.…

more

A specially crafted packet can cause dhclient to overrun its buffer of environment entries. This can result in a crash, but it may be possible to leverage this bug to achieve remote code execution.

Mitigating Controls (NIST 800-53 r5)AI

prevent

Directly remediates the heap buffer overrun in dhclient by identifying, reporting, and applying patches as specified in the FreeBSD security advisory.

prevent

Implements memory safeguards like non-executable memory and address space layout randomization to prevent exploitation of the heap buffer overrun for remote code execution.

preventdetect

Conducts vulnerability scanning to detect the dhclient heap buffer overrun (CVE-2026-42512) and triggers timely remediation.

Security SummaryAI

CVE-2026-42512 is a heap buffer overrun vulnerability (CWE-122) affecting dhclient, the DHCP client daemon in FreeBSD. The flaw arises when dhclient constructs an environment array of string pointers to pass to dhclient-script and must resize it. The code miscalculates the new array size during memory allocation, resulting in a heap buffer overrun. This vulnerability was published on 2026-04-30.

A remote, unauthenticated attacker can trigger the issue by sending a specially crafted DHCP packet, causing dhclient to overrun its buffer of environment entries. Exploitation leads to a denial-of-service condition through a crash of the dhclient process. Under certain conditions, the buffer overrun may be leveraged for remote code execution. The CVSS v3.1 base score is 8.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H), reflecting network accessibility, high attack complexity, and high impact on confidentiality, integrity, and availability.

The FreeBSD Security Advisory FreeBSD-SA-26:15.dhclient details mitigation measures and available patches, accessible at https://security.freebsd.org/advisories/FreeBSD-SA-26:15.dhclient.asc.

Details

CWE(s)

Affected Products

freebsd
freebsd
13.5, 14.3, 14.4, 15.0

MITRE ATT&CK Enterprise TechniquesAI

T1203 Exploitation for Client Execution Execution
Adversaries may exploit software vulnerabilities in client applications to execute code.
Why these techniques?

The vulnerability is a remote heap buffer overflow in the dhclient DHCP client daemon triggered by crafted packets, directly enabling remote code execution on a client application without user interaction.

Confidence: HIGH · MITRE ATT&CK Enterprise v18.1

References