freenode
Security & Cryptography

EDK II PXE flaw enables pre-boot remote code execution

CVE-2026-97631 lets an unauthenticated attacker corrupt memory and run code during network boot, before Secure Boot or the OS load.

A memory-corruption bug in the PXE Base Code driver shipped with EDK II firmware allows an unauthenticated network attacker to execute arbitrary code while a machine is still booting over the network, before the operating system loads and before Secure Boot or measured boot has verified any OS component.

CVE-2026-97631 affects systems PXE-booting over IPv4 or IPv6. The driver keeps a receive path open for ICMP error messages and copies them into a fixed-size buffer in its private context. Bounds handling in both the IPv4 and IPv6 handlers is wrong: oversized messages still get copied, and the destination pointer advances by the cumulative rather than the per-fragment length, so attacker-controlled bytes write past the field. Nothing earlier on the receive path limits message length.

The attacker needs only to deliver a unicast ICMP error addressed to the client's IP from any network distance. The exposure window is the duration of the PXE boot. Consequences range from deterministic corruption that hangs the boot on a later ICMP error, denying OS provisioning or recovery, to planting a counterfeit event that the DXE core dispatches as attacker-supplied code in ring 0, before any OS security control exists. Achieving reliable code execution requires knowledge of the target firmware build.

The issue was found by Alex Matrosov of Anthropic and Dan Holmes-Mitra of Google, who also supplied the recommended fix. A patch is available in the EDK II project. Vendors and operators that ship or maintain EDK II-based firmware and rely on network boot should treat the advisory as high priority: the flaw sits below the OS trust boundary and can affect large server fleets that still use PXE for provisioning.