/

CVE-2026-33414

Severity:

HIGH RISK

(7.8)

Command Injection in Podman HyperV Machine Backend

CVE-2026-33414

Modified

Vulnerability type

Category:

Command Injection

CWE:

CWE-78, CWE-94

Impact:

Remote Code Execution (RCE) on Windows HyperV Hosts

Severity:

HIGH RISK

(7.8)

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

A command injection vulnerability in Podman's HyperV machine backend allows attacker-controlled VM image paths to be embedded in a PowerShell double-quoted string without proper sanitization.

Because PowerShell evaluates $() subexpressions before running the outer command, a crafted machine name or image directory can trigger arbitrary PowerShell execution with the privileges of the Podman process on Windows systems.

Affected context

This vulnerability occurs in Podman deployments on Windows that use the HyperV machine backend implemented in pkg/machine/hyperv/stubber.go.

The issue is relevant when:

  • Podman constructs PowerShell commands to manage HyperV-based virtual machines
  • The VM image path is derived from user-controlled or partially user-controlled input such as machine names or image directories
  • The resulting path is interpolated directly into a PowerShell double-quoted string

Only Windows environments using the HyperV backend are affected; other Podman platforms and backends are not impacted by this specific bug.

Exploit preconditions

  • Attack surface: Podman's machine management functionality on Windows, specifically the HyperV backend.
  • Required access: Ability to influence the VM image path, for example via crafted machine names, image directory paths, or other inputs that propagate into the image path.
  • Trigger point: Execution of a PowerShell command that includes the unsanitized VM image path inside a double-quoted string, typically when creating or managing a HyperV VM through Podman.
  • Why exploitation is possible: The VM image path is interpolated directly into a PowerShell double-quoted string without escaping or validation, enabling $() subexpression injection. PowerShell evaluates these subexpressions before running the main command, so injected content runs as part of the Podman process context.

Why this happens

The core issue is unsafe construction of shell commands with untrusted input, aligning with CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').

In the HyperV backend, the VM image path is concatenated into a PowerShell command as a double-quoted string without neutralizing or escaping characters meaningful to PowerShell, such as $( and ).

This pattern treats user-influenced data as if it were safe code, allowing attackers to embed PowerShell subexpressions that are evaluated at runtime.

The bug is not specific to one particular string but to the general practice of directly interpolating file system paths or names into shell commands without robust encoding or parameterization.

Potential impact

  • Arbitrary PowerShell command execution with the privileges of the Podman process.
  • On typical Windows setups, potential SYSTEM-level code execution via the HyperV backend service context.
  • Full compromise of the affected Windows host, including installation of malware or backdoors.
  • Lateral movement within the network if the compromised host has access to other systems.
  • Modification or destruction of VM images and associated data managed by Podman.

General mitigation guidance

Effective mitigation focuses on eliminating direct command-string construction with untrusted input and reducing the privilege and scope of any remaining command execution.

Recommended defensive patterns include:

  • Parameterization and escaping: Use PowerShell APIs or command builders that pass user-controlled values as parameters rather than inline strings, or apply rigorous escaping/encoding of special characters in any interpolated paths.
  • Canonicalization and validation: Normalize and validate VM image paths against strict, expected patterns (e.g., allowlisted directories, restricted character sets) before use in any command context.
  • Least privilege: Run Podman-related Windows services and HyperV management components under accounts with minimal necessary privileges instead of SYSTEM where possible.
  • Segregation of duties: Separate user input handling from command execution logic so that only vetted, normalized values reach shell-level operations.
  • Defense-in-depth checks: Introduce guardrails that reject inputs containing shell metacharacters or PowerShell-specific constructs like $(, backticks, or pipeline characters when they are not required.

How teams detect issues like this

Organizations can detect and prevent similar vulnerabilities by combining automated and manual review techniques:

  • Static analysis: Configure SAST tools to flag string concatenation patterns used to build shell commands, especially where user input or file paths flow into PowerShell or other shell invocations.
  • Code review checklists: During reviews, require scrutiny of any code that calls PowerShell, cmd.exe, or other interpreters, ensuring that all arguments are passed as parameters and not embedded in raw command strings.
  • Policy enforcement: Establish coding standards banning unescaped interpolation of user-supplied data into OS commands, and enforce these standards via pre-commit hooks or CI pipelines.
  • Runtime monitoring: Use endpoint detection and response (EDR) tools on Windows hosts to monitor for unusual PowerShell invocations originating from Podman-related processes, including unexpected parameters or execution contexts.

Sources

SourceLink
github.comgithub.com/containers/podman/commit/571c842bd357ee626019ea97d030fb772fc654ed
github.comgithub.com/containers/podman/security/advisories/GHSA-hc8w-h2mf-hp59
access.redhat.comaccess.redhat.com/errata/RHSA-2026:8211
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-33414
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2458522
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33414.json

Frequently asked

questions

Exploitation is limited to environments where an attacker can influence the VM image path used by Podman's HyperV backend on Windows. In setups where machine names, directories, or image paths are tightly controlled and not exposed to untrusted input, the practical risk is reduced.

An attacker must be able to supply or affect the values that contribute to the VM image path, such as controlling machine names, directory structures, or configuration entries that Podman uses when constructing HyperV-related PowerShell commands.

Replace hand-built PowerShell command strings with parameterized calls that treat the VM image path as a data argument, not as part of the command code. Apply strict validation and canonicalization to any paths before they reach command execution, and ensure shell-metacharacters are neutralized when not expected.

Adopt a secure coding standard that forbids direct interpolation of untrusted data into shell commands, mandate use of safe wrappers or libraries for command execution, and integrate static analysis and code review practices focused on command construction and input validation.

Find out what's already
exploitable in your codebase.