/

CVE-2026-16445

Severity:

HIGH RISK

(7.5)

Command Injection (CWE-78) in dracut initrd networking

CVE-2026-16445

Awaiting Analysis

Vulnerability type

Category:

Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution with Root Privileges

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

dracut's NetworkManager-based initrd network module improperly writes DHCP option values into a shell script without adequate escaping, enabling command injection.

An attacker on the adjacent network who can supply crafted DHCP options may execute arbitrary commands as root within the initramfs during system boot.

Affected context

This vulnerability appears in systems that:

  • Use dracut to build an initramfs for network-based boot or early network configuration
  • Rely on the NetworkManager-based initrd network module to process DHCP options
  • Accept DHCP parameters such as root-path, next-server, or bootfile name during early boot

The issue is present when DHCP-provided values are embedded into temporary shell scripts before being sanitized or treated as untrusted input.

Exploit preconditions

  • Attack surface: DHCP interaction on the adjacent network during system boot
  • Required access: Ability to operate or spoof a DHCP server visible to the target host
  • Trigger point: Processing of DHCP options by dracut's NetworkManager-based initrd module, which generates and executes temporary shell scripts
  • Why exploitation is possible: DHCP option values are inserted into shell script content or command lines without proper quoting or escaping, allowing attacker-controlled data to be interpreted as shell syntax.

Why this happens

The bug stems from unsafe construction of shell scripts that incorporate external configuration values from DHCP without rigorous sanitization.

Instead of treating DHCP options as opaque data, the script-building logic interpolates them directly into commands or variables, which the shell then parses and executes.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, where user-controllable input is allowed to influence command structure rather than being constrained to data-only parameters.

Potential impact

  • Remote execution of arbitrary commands as root within the initramfs
  • Alteration of boot parameters or early system configuration
  • Installation of persistent boot-time backdoors
  • Tampering with filesystem mounts or root device selection
  • Potential escalation to full system compromise once the OS finishes booting

General mitigation guidance

Effective mitigation focuses on preventing untrusted network-derived values from being interpreted as shell syntax or command fragments.

Common defensive patterns include:

  • Treating DHCP option values as data-only and never interpolating them directly into command strings
  • Applying strict quoting and escaping whenever configuration values are passed into shell scripts
  • Using safer interfaces (e.g., structured configuration files, environment variables with controlled parsing) instead of dynamic script generation
  • Reducing trust in network-provided boot parameters by validating them against expected formats and whitelists
  • Running early-boot networking logic with the minimal privileges necessary and limiting what it can modify in the system state

How teams detect issues like this

Organizations can detect similar command injection risks by:

  • Running static analysis focused on shell command construction and string interpolation patterns involving external inputs
  • Reviewing initramfs build scripts and network modules for places where DHCP or other network configuration values are written into shell scripts
  • Incorporating security-oriented code review checklists that flag variable expansion in shell commands, especially in boot-critical paths
  • Applying policy-based checks (e.g., CI rules) that prohibit dynamically generated shell scripts from including untrusted data without sanitization

Sources

SourceLink
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26534
access.redhat.comaccess.redhat.com/errata/RHSA-2026:40700
access.redhat.comaccess.redhat.com/errata/RHSA-2026:61252
access.redhat.comaccess.redhat.com/errata/RHSA-2026:69118
access.redhat.comaccess.redhat.com/errata/RHSA-2026:69119
access.redhat.comaccess.redhat.com/errata/RHSA-2026:90272
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-16445
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2459963
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2503147
github.comgithub.com/dracutdevs/dracut/commit/e509c638e6

Frequently asked

questions

It generally requires an attacker to be on the same local or adjacent network segment as the target, with the ability to influence or spoof DHCP responses. It is not typically exploitable from arbitrary remote locations on the internet.

The attacker needs control over a DHCP server or the ability to inject DHCP responses that the target system will accept during early boot. No prior authentication on the host itself is required.

The safest approach is to ensure that all external configuration values, especially those coming from network services like DHCP, are treated as untrusted data, rigorously validated, and never directly embedded into shell commands without strict quoting and escaping.

Preventing similar issues involves adopting secure coding practices for shell and init scripts, using structured configuration mechanisms instead of dynamic script generation, enforcing input validation policies for network-derived data, and integrating static analysis and security-focused code review into the development and build pipelines.

Find out what's already
exploitable in your codebase.