Skip to content
Threat Feed
high advisory

Command Injection in Dracut Emergency Hook Mechanism

A vulnerability in the dracut initramfs emergency-hook mechanism allows an attacker with access to the local network to perform command injection and achieve root code execution during system boot.

A security vulnerability exists in the dracut initramfs emergency-hook mechanism, identified as CVE-2026-15816. The issue originates in the die() error-handling function, which fails to correctly shell-quote error messages before writing them into a shell script within the initramfs emergency-hook directory. Attackers on an adjacent network can exploit this by acting as a rogue DHCP server and providing a malicious ROOT_PATH option. When the client system encounters a boot failure that triggers the dracut error-handling routine, the injected command-substitution sequence within the error message is executed as root. This is a significant concern for environments where systems rely on network booting or are susceptible to local network man-in-the-middle attacks via DHCP, as it grants complete control over the booting system before the primary operating system environment is fully initialized.

Attack Chain

  1. The attacker configures a rogue DHCP server on the target's local network segment.
  2. The target system attempts to boot and initiates a DHCP request as part of the initramfs phase.
  3. The attacker's rogue DHCP server intercepts the request and responds with a crafted ROOT_PATH option containing malicious shell command-substitution sequences (e.g., $(command)).
  4. The target's dracut environment processes the DHCP response and stores the malicious ROOT_PATH content.
  5. The system experiences a boot failure, causing the dracut environment to trigger the die() error-handling function.
  6. The die() function writes the unsanitized, malicious error message into an emergency-hook shell script.
  7. The dracut initramfs executes the emergency-hook script during the recovery process.
  8. The malicious payload executes with root privileges, leading to system compromise.

Impact

Successful exploitation allows for arbitrary code execution with root privileges during the system boot process. This can lead to full system compromise, persistence installation, or data exfiltration before the legitimate OS environment is fully loaded. Given that this occurs within the initramfs, standard OS-level security controls may not yet be active.

Recommendation

Prioritized actions for security and infrastructure teams:

  • Update the dracut package across all Linux distributions to the version containing the fix for CVE-2026-15816.
  • Implement network-level protections to prevent unauthorized DHCP servers (DHCP snooping) on critical network segments to mitigate the initial access vector.
  • Audit infrastructure configurations that utilize PXE or network-based booting to ensure only authorized DHCP servers are permitted.

Immediate actions

Patch dracut on all Linux systems per CVE-2026-15816.

IT Operations 72h

Mitigations

Enable DHCP snooping on network switches to block unauthorized rogue DHCP servers.

immediate Network Engineering

CVE-2026-15816