Podman Environment Variable Leak via Malformed Container Images
A vulnerability in Podman allows malicious container images containing malformed environment variables to exfiltrate host environment variables into the container environment at runtime.
CVE search metadata
CVE search record: CVE-2026-57231. Severity: high. CVSS: 7.5. EPSS: 0.31%. KEV: no. Product: Podman (< 5.8.4, < 6.0.0, <= 4.9.5, <= 3.4.7, <= 2.2.1). Brief: Podman Environment Variable Leak via Malformed Container Images. Brief link: https://feed.craftedsignal.io/briefs/2026-09-podman-env-leak/
Podman contains a high-severity vulnerability (CVE-2026-57231) that enables the unauthorized exfiltration of host environment variables into a running container. The issue arises from flawed parsing logic within the container image configuration; specifically, if an image defines environment variables without an accompanying value, or utilizes wildcard characters such as an asterisk, Podman improperly interprets these entries.
By design, the Podman --env flag is intended to map host variables to a container. Due to the reuse of this parsing logic for image configuration, an attacker can craft a container image that forces the container engine to mirror sensitive host-side environment variables - such as API keys, database credentials, or tokens - directly into the container's process space upon execution. This vulnerability affects multiple versions of Podman across the v2 through v6 branches. Defenders should prioritize upgrading to patched versions or implementing strict image validation processes.
Impact
Successful exploitation allows an attacker to gain unauthorized access to sensitive host environment variables. In cloud or CI/CD environments where containers are frequently executed, this could lead to the exposure of credentials, service account tokens, or environment configuration secrets, potentially facilitating lateral movement or privilege escalation within the host or broader infrastructure.
Recommendation
- Upgrade Podman to a secure version as specified in the advisory: v5.8.4, v6.0.0, or higher depending on the deployment branch.
- Prior to execution, audit untrusted container images using the command:
podman image inspect --format '{{.Config.Env}}' <image>. Identify and block images containing environment variables that lack a key-value assignment (i.e., variables not following thekey=valueformat). - Enforce strict policies regarding the ingestion of images from public or untrusted container registries.
Immediate actions
Upgrade Podman to v5.8.4 or v6.0.0 based on the installed version
Mitigations
Implement a CI/CD gate that runs 'podman image inspect' to flag images with malformed environment variables
CVE-2026-57231