CVE-2026-66138 Overview
CVE-2026-66138 is a command injection vulnerability in OpenStack Ironic Python Agent through version 11.6.0. A project-scoped user holding the manager role can achieve arbitrary code execution on a running Ironic-Python-Agent by supplying a maliciously constructed configuration. The ntp_server configuration value is passed to a shell without sanitization, enabling attacker-controlled shell metacharacters to execute. The flaw is tracked under CWE-78 (OS Command Injection).
Critical Impact
Authenticated project-scoped users with the manager role can execute arbitrary commands on bare-metal provisioning agents, compromising confidentiality, integrity, and availability of Ironic-managed hardware.
Affected Products
- OpenStack Ironic Python Agent through 11.6.0
- OpenStack deployments exposing the Ironic bare-metal provisioning service
- Any downstream distribution bundling vulnerable Ironic-Python-Agent releases
Discovery Timeline
- 2026-07-24 - CVE-2026-66138 published to NVD
- 2026-07-30 - Last updated in NVD database
Technical Details for CVE-2026-66138
Vulnerability Analysis
The vulnerability resides in how Ironic Python Agent handles the ntp_server configuration value during bare-metal node provisioning. Instead of treating the value as a data parameter passed to an NTP client through a safe execution API, the agent interpolates it into a shell command string. When the resulting string reaches the shell, embedded metacharacters such as ;, |, `, or $() are parsed as command separators or subshell invocations.
An attacker with the OpenStack manager role at the project scope can set a crafted ntp_server value through the standard configuration path. When the agent applies the configuration, the injected commands execute in the context of the Ironic-Python-Agent process on the provisioning host or ramdisk. This grants code execution on infrastructure typically running with elevated privileges to manage physical hardware.
Root Cause
The root cause is unsafe construction of a shell command from user-controllable configuration input. The ntp_server value flows into a subprocess call executed with shell=True semantics rather than being passed as a discrete argument vector. This pattern is a canonical CWE-78 failure: input validation is either absent or insufficient to strip shell-significant characters before command construction.
Attack Vector
Exploitation requires an authenticated account with the manager role in a project scope. The attacker submits a configuration containing a weaponized ntp_server value, for example a hostname suffixed with a shell command separator followed by arbitrary payload commands. When the Ironic-Python-Agent processes the configuration, the shell interprets the payload and executes attacker-supplied code. Refer to the OpenStack Security Advisory OSSA-2026-027 and the Launchpad Bug Report for technical detail.
Detection Methods for CVE-2026-66138
Indicators of Compromise
- Unexpected child processes spawned by the Ironic-Python-Agent process, particularly shells (sh, bash) invoking network utilities, package managers, or interpreters.
- Anomalous ntp_server configuration values containing shell metacharacters such as ;, &&, |, backticks, or $().
- Outbound network connections from provisioning ramdisks or IPA hosts to unfamiliar destinations shortly after configuration application.
- Ironic API audit log entries showing manager-role users modifying node driver_info or configuration fields with unusual payloads.
Detection Strategies
- Audit OpenStack Keystone role assignments to enumerate all project-scoped users granted the manager role and correlate their activity against Ironic API calls.
- Alert on process-execution telemetry where ironic-python-agent is the parent of interactive shells or command interpreters.
- Parse Ironic and Ironic-Python-Agent logs for ntp_server values that fail a strict hostname or IP address regex.
Monitoring Recommendations
- Ingest Ironic API logs, Keystone audit events, and provisioning host process telemetry into a centralized data lake for correlation across the provisioning workflow.
- Baseline expected child processes of the agent and generate alerts on deviation.
- Monitor for configuration changes to ntp_server outside of documented change-management windows.
How to Mitigate CVE-2026-66138
Immediate Actions Required
- Upgrade Ironic-Python-Agent to a patched release beyond 11.6.0 as specified in OSSA-2026-027.
- Restrict the manager role to trusted operators and remove standing assignments from general project users.
- Review recent ntp_server configuration values across all Ironic nodes for signs of injection.
- Rebuild any provisioning ramdisks or images that may have executed attacker-controlled payloads.
Patch Information
Refer to the OpenStack Security Advisory OSSA-2026-027 and the upstream Launchpad Bug Report 2160050 for fixed version identifiers and backport availability. Additional coordination detail is available on the OpenWall oss-security mailing list.
Workarounds
- Apply strict input validation at an upstream API gateway or policy engine to reject ntp_server values that do not match a hostname or IP address pattern.
- Use OpenStack policy files to further constrain which principals can modify Ironic node configuration.
- Isolate Ironic-Python-Agent network paths so that any code execution is contained within a segmented provisioning network.
# Configuration example: tighten Keystone role assignments and validate ntp_server
# 1. Enumerate manager-role assignments
openstack role assignment list --role manager --names
# 2. Remove manager role from a non-administrative user
openstack role remove --user <user> --project <project> manager
# 3. Example policy.yaml restriction for Ironic node updates
# "baremetal:node:update": "role:admin"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

