Bug 2459963 (CVE-2026-6893) - CVE-2026-6893 dracut: dracut: Root code execution via DHCP options command injection
Summary: CVE-2026-6893 dracut: dracut: Root code execution via DHCP options command in...
Keywords:
Status: NEW
Alias: CVE-2026-6893
Deadline: 2026-06-10
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-04-21 02:37 UTC by OSIDB Bzimport
Modified: 2026-10-08 10:44 UTC (History)
19 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2026:26532 0 None None None 2026-06-17 09:23:25 UTC
Red Hat Product Errata RHSA-2026:26533 0 None None None 2026-06-17 10:08:59 UTC
Red Hat Product Errata RHSA-2026:26534 0 None None None 2026-06-17 09:36:00 UTC
Red Hat Product Errata RHSA-2026:57580 0 None None None 2026-08-20 16:08:04 UTC
Red Hat Product Errata RHSA-2026:57772 0 None None None 2026-08-20 21:33:54 UTC
Red Hat Product Errata RHSA-2026:57775 0 None None None 2026-08-20 20:39:47 UTC
Red Hat Product Errata RHSA-2026:57785 0 None None None 2026-08-20 20:58:48 UTC
Red Hat Product Errata RHSA-2026:61252 0 None None None 2026-08-31 03:27:03 UTC
Red Hat Product Errata RHSA-2026:62269 0 None None None 2026-09-01 19:46:49 UTC
Red Hat Product Errata RHSA-2026:62409 0 None None None 2026-09-14 13:30:51 UTC
Red Hat Product Errata RHSA-2026:62549 0 None None None 2026-09-10 08:50:48 UTC
Red Hat Product Errata RHSA-2026:63044 0 None None None 2026-09-09 09:22:54 UTC
Red Hat Product Errata RHSA-2026:65839 0 None None None 2026-09-17 17:11:20 UTC
Red Hat Product Errata RHSA-2026:65851 0 None None None 2026-09-17 07:56:59 UTC
Red Hat Product Errata RHSA-2026:67857 0 None None None 2026-09-28 01:40:51 UTC
Red Hat Product Errata RHSA-2026:69118 0 None None None 2026-09-21 02:40:37 UTC
Red Hat Product Errata RHSA-2026:69119 0 None None None 2026-09-21 02:47:35 UTC
Red Hat Product Errata RHSA-2026:70586 0 None None None 2026-10-01 12:28:44 UTC
Red Hat Product Errata RHSA-2026:70615 0 None None None 2026-10-01 15:25:08 UTC
Red Hat Product Errata RHSA-2026:74499 0 None None None 2026-10-01 14:18:25 UTC
Red Hat Product Errata RHSA-2026:79114 0 None None None 2026-10-08 10:44:57 UTC

Description OSIDB Bzimport 2026-04-21 02:37:47 UTC
AI_ONLY_REPORT
package: RHEL_base/dracut-107-4.el10
[Security] Command Injection via DHCP Options in dhclient-script.sh
Hello dracut maintainers,
We believe that we have discovered a potential security vulnerability in this repository: command injection in the legacy DHCP path (`modules.d/35network-legacy/dhclient-script.sh`), leading to root code execution in initramfs.


Vulnerability details






DHCP-provided values are written into temporary shell scripts and later sourced as root, without safe shell escaping.
```sh
modules.d/35network-legacy/dhclient-script.sh
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
...
echo ip route replace default via "$main_gw" dev "$netif" >> /tmp/net."$netif".gw
...
echo "/sbin/ip route replace $temp_result"
```


These generated files are then sourced:
```sh
modules.d/45net-lib/net-lib.sh
[ -e /tmp/net."$netif".hostname ] && . /tmp/net."$netif".hostname
[ -e /tmp/dhclient."$netif".dhcpopts ] && . /tmp/dhclient."$netif".dhcpopts
[ -e /tmp/net."$netif".gw ] && . /tmp/net."$netif".gw
```


And initqueue jobs are sourced as shell code:
```sh
modules.d/99base/init.sh
for job in "$hookdir"/initqueue/*.sh; do
 job=$job . "$job"
done
```


A malicious DHCP server can provide `host-name` (and potentially routing-related options) containing shell metacharacters, which are persisted into these scripts and executed as root.
Relevant CWEs:
CWE-78: Improper Neutralization of Special Elements used in an OS Command.

CWE-94: Improper Control of Generation of Code (dynamic shell script generation from untrusted input).




Reproduction steps






1. Build/initramfs boot path that uses `35network-legacy` and `dhclient` (`ip=dhcp`, `rd.neednet=1`).
2. On the same L2 segment, run a DHCP server that returns a malicious host-name, for example: 
`host-name = "pwn; touch /tmp/dracut_poc #"`
3. Boot the target so DHCP reaches `BOUND`.
4. Observe generated script content (in initramfs shell): 
`/tmp/net.<iface>.hostname` contains injected shell syntax.
5. Wait for `setup_net` / initqueue processing; verify `/tmp/dracut_poc` exists, proving command execution as root.


Proposed fix (example patch)






```diff
diff --git a/modules.d/35network-legacy/dhclient-script.sh b/modules.d/35network-legacy/dhclient-script.sh
@@ -72,7 +72,10 @@ setup_interface() {
[ -n "$hostname" ] && echo "echo ${hostname%."$domain"}${domain:+.$domain} > /proc/sys/kernel/hostname" > /tmp/net."$netif".hostname
+ if [ -n "$hostname" ]; then
+ safe_hostname=$(printf '%s' "${hostname%."$domain"}${domain:+.$domain}")
+ printf 'echo %q > /proc/sys/kernel/hostname\n' "$safe_hostname" > /tmp/net."$netif".hostname
+ fi
@@ -54,7 +57,7 @@ setup_interface() {

echo ip route replace default via "$main_gw" dev "$netif" >> /tmp/net."$netif".gw
+ printf 'ip route replace default via %q dev %q\n' "$main_gw" "$netif" >> /tmp/net."$netif".gw
 if [ -n "$other_gw" ]; then
 for g in $other_gw; do

echo ip route add default via "$g" dev "$netif" >> /tmp/net."$netif".gw
+ printf 'ip route add default via %q dev %q\n' "$g" "$netif" >> /tmp/net."$netif".gw
 done
 fi
@@ -159,7 +162,7 @@ parse_option_121() {

echo "/sbin/ip route replace $temp_result"
+ printf '/sbin/ip route replace %q\n' "$temp_result"
 done
 }
```


Longer-term, avoiding dynamic shell script generation for DHCP-derived values would be safer.


CVSS 3.1 estimate






*Score:* 8.8 (HIGH) 

*Vector:* `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`


Brief rationale:
*AV:A*: attacker must be on adjacent network (DHCP domain).

*AC:L*: straightforward malicious DHCP response.

*PR:N*: no prior auth required.

*UI:N*: no user interaction.

*S:U*: impact within same trust scope.

*C/I/A:H*: root command execution in initramfs can fully compromise boot/network behavior and availability.


------
This report was generated using AI technology. Always review AI-generated content prior to use

Comment 2 errata-xmlrpc 2026-06-17 09:23:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10

Via RHSA-2026:26532 https://access.redhat.com/errata/RHSA-2026:26532

Comment 3 errata-xmlrpc 2026-06-17 09:35:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2026:26534 https://access.redhat.com/errata/RHSA-2026:26534

Comment 4 errata-xmlrpc 2026-06-17 10:08:58 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2026:26533 https://access.redhat.com/errata/RHSA-2026:26533

Comment 6 errata-xmlrpc 2026-08-20 16:08:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 10.0 Extended Update Support

Via RHSA-2026:57580 https://access.redhat.com/errata/RHSA-2026:57580

Comment 7 errata-xmlrpc 2026-08-20 20:39:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions

Via RHSA-2026:57775 https://access.redhat.com/errata/RHSA-2026:57775

Comment 8 errata-xmlrpc 2026-08-20 20:58:46 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions

Via RHSA-2026:57785 https://access.redhat.com/errata/RHSA-2026:57785

Comment 9 errata-xmlrpc 2026-08-20 21:33:53 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.6 Extended Update Support

Via RHSA-2026:57772 https://access.redhat.com/errata/RHSA-2026:57772

Comment 10 errata-xmlrpc 2026-08-31 03:27:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.8 Telecommunications Update Service

Via RHSA-2026:61252 https://access.redhat.com/errata/RHSA-2026:61252

Comment 11 errata-xmlrpc 2026-09-01 19:46:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7 Extended Lifecycle Support

Via RHSA-2026:62269 https://access.redhat.com/errata/RHSA-2026:62269

Comment 12 errata-xmlrpc 2026-09-09 09:22:52 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.19

Via RHSA-2026:63044 https://access.redhat.com/errata/RHSA-2026:63044

Comment 13 errata-xmlrpc 2026-09-10 08:50:46 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.16

Via RHSA-2026:62549 https://access.redhat.com/errata/RHSA-2026:62549

Comment 14 Jon Orris 2026-09-14 13:30:49 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.14

Via RHSA-2026:62409 https://access.redhat.com/errata/RHSA-2026:62409

Comment 15 Jon Orris 2026-09-17 07:56:57 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.18

Via RHSA-2026:65851 https://access.redhat.com/errata/RHSA-2026:65851

Comment 16 Jon Orris 2026-09-17 17:11:19 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.13

Via RHSA-2026:65839 https://access.redhat.com/errata/RHSA-2026:65839

Comment 17 Jon Orris 2026-09-21 02:40:35 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On

Via RHSA-2026:69118 https://access.redhat.com/errata/RHSA-2026:69118

Comment 18 Jon Orris 2026-09-21 02:47:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On

Via RHSA-2026:69119 https://access.redhat.com/errata/RHSA-2026:69119

Comment 19 Jon Orris 2026-09-28 01:40:49 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.15

Via RHSA-2026:67857 https://access.redhat.com/errata/RHSA-2026:67857

Comment 20 Jon Orris 2026-10-01 12:28:42 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.17

Via RHSA-2026:70586 https://access.redhat.com/errata/RHSA-2026:70586

Comment 21 Jon Orris 2026-10-01 14:18:24 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6 Extended Lifecycle Support  - EXTENSION

Via RHSA-2026:74499 https://access.redhat.com/errata/RHSA-2026:74499

Comment 22 Jon Orris 2026-10-01 15:25:06 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.18

Via RHSA-2026:70615 https://access.redhat.com/errata/RHSA-2026:70615

Comment 25 Jon Orris 2026-10-08 10:44:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6 Extended Lifecycle Support  - EXTENSION

Via RHSA-2026:79114 https://access.redhat.com/errata/RHSA-2026:79114


Note You need to log in before you can comment on or make changes to this bug.