A flaw was found in dracut. A remote attacker on the adjacent network can exploit this vulnerability by providing specially crafted DHCP options, such as a malicious root-path, next-server, or bootfile name, to a system using dracut's NetworkManager-based initrd network module. These options are improperly handled and written into a temporary shell script without proper escaping, leading to command injection. This allows the attacker to achieve root code execution within the initramfs during system boot.
Escape DHCP-derived values (root-path, next-server, dhcp-bootfile) with shell-safe quoting (for example printf '%q') before writing them to the generated dhcpopts file in modules.d/35network-manager/nm-run.sh. This approach is already used in dracut-057 and later, and is already present in the RHEL 8.10.z dracut-049-244.git20260529.el8_10 build.