CVE-2026-15816: Dracut: dracut: root code execution via unescaped error message written to sourced emergency hook script in die()

Published Jul 15, 2026
·
Updated

A flaw was found in dracut. The die() error-handling function writes its message into a shell script under the initramfs emergency-hook directory without properly shell-quoting it. When the message contains data derived from the DHCP ROOTPATH option, an attacker on the adjacent network who controls a rogue DHCP server can inject a command-substitution sequence that executes as root the next time dracut sources its emergency hook scripts during standard boot-failure handling.

Other sources

A flaw was found in dracut. The die() function in dracut-lib.sh appends its error message to $hookdir/emergency/01-die.sh using echo "warn dracut: FATAL: \"$\"", without shell-quoting the message. When the message passed to die() contains DHCP-controlled data -- specifically $netroot, derived from the DHCP ROOTPATH option via netroot.sh's handler-resolution failure path (die "No handler for netroot type '$netroot'") -- a command-substitution sequence such as $(cmd) embedded in that data survives into the generated 01-die.sh line and executes as root the next time dracut sources the emergency hook directory. This occurs during dracut's standard boot-failure handling: when the netroot handler cannot be resolved, dracut's initqueue-timeout fallback (or, on non-default rd.shell configurations, die() itself) eventually invokes emergencyshell(), which sources every script under $hookdir/emergency/, including the attacker-poisoned 01-die.sh. This is a distinct code path from CVE-2026-6893 (dhclient-script.sh writing unescaped DHCP hostname/route values); CVE-2026-6893's fix does not touch die() and does not remediate this issue. Reproduced directly against die() extracted from shipped dracut RPMs spanning RHEL 6 through RHEL 10 in an isolated sandbox: a crafted netroot value containing $(touch /tmp/marker) created the marker file upon sourcing the generated 01-die.sh, while a clean/benign netroot value round-tripped with identical warning text in every version tested. Replacing the manual echo/quoting with printf '%q' was verified to neutralize the injection while preserving identical warning output for benign input.

Red Hat

Affected Software

1 affected component
dracut

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In dracut-lib.sh, update die() so the message appended to "$hookdir/emergency/01-die.sh" is shell-quoted (e.g., use printf '%q' for the message contents) rather than written via echo without shell-quoting.

    dracut die() (dracut-lib.sh) message quoting when generating $hookdir/emergency/01-die.sh = replace echo "warn dracut: FATAL: \"$*\"" with printf '%q' to shell-quote the die() message before writing it into 01-die.sh
  2. Compensating control

    If possible, prevent attacker control of DHCP-derived values by ensuring only trusted DHCP servers are reachable (e.g., block/deny rogue DHCP responses) so DHCP ROOT_PATH-controlled content cannot reach dracut die() during initramfs emergency-hook execution.

Event History

Jul 15, 2026
Data Sourced
via Red Hat·11:44 AM
DescriptionSeverityAffected Software
Aug 7, 2026
CVE Published
via MITRE·10:33 AM
Data Sourced
via MITRE·10:33 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·11:17 AM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-15816?

CVE-2026-15816 has a high severity rating of 7.5.

2

What type of vulnerability is CVE-2026-15816?

CVE-2026-15816 is classified as an OS Command Injection vulnerability.

3

How can CVE-2026-15816 be exploited?

An attacker on an adjacent network can exploit CVE-2026-15816 by controlling the DHCP ROOT_PATH option to execute root code.

4

What software is affected by CVE-2026-15816?

CVE-2026-15816 affects the Dracut software.

5

How do I fix CVE-2026-15816?

To fix CVE-2026-15816, apply the latest updates and patches provided by your software vendor for Dracut.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203