REDHAT-BUG-2458522: Command Injection
Podman is a tool for managing OCI containers and pods. Versions 4.8.0 through 5.8.1 contain a command injection vulnerability in the HyperV machine backend in pkg/machine/hyperv/stubber.go, where the VM image path is inserted into a PowerShell double-quoted string without sanitization, allowing $() subexpression injection. Because PowerShell evaluates subexpressions inside double-quoted strings before executing the outer command, an attacker who can control the VM image path through a crafted machine name or image directory can execute arbitrary PowerShell commands with the privileges of the Podman process. On typical Windows installations this means SYSTEM-level code execution, and only Windows is affected as the code is exclusive to the HyperV backend. This issue has been patched in version 5.8.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
podmanto a version that resolves this vulnerability.Fixed in 5.8.2
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2458522?
The severity of REDHAT-BUG-2458522 is high with a CVSS score of 7.
What is the nature of the vulnerability in REDHAT-BUG-2458522?
REDHAT-BUG-2458522 describes a command injection vulnerability in the HyperV machine backend of Podman.
How do I fix REDHAT-BUG-2458522?
To fix REDHAT-BUG-2458522, upgrade Podman to a version beyond 5.8.1.
Which versions of Podman are affected by REDHAT-BUG-2458522?
Podman versions 4.8.0 through 5.8.1 are affected by REDHAT-BUG-2458522.
What components of Podman are vulnerable in REDHAT-BUG-2458522?
The vulnerability in REDHAT-BUG-2458522 specifically affects the HyperV machine backend in the file pkg/machine/hyperv/stubber.go.