CVE-2026-57231
JSON

7.5high

Podman: Malformed Image can trick podman run into leaking host environment variables into the container

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.43% (higher than 29% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-4hq8-gpf5-8p68GO-2026-6594

Description

Podman is a tool for managing OCI containers and pods. From 1.8.1 until 5.8.4, a container image that contains a environment variable with just a key and no value can trick podman into passing that variable from the host into the container. This is made worse by the fact that using an asterisk (*) will cause podman to pass all host variables into the container. So essentially a malicious image can exfiltrate all podman environment variables that are set in the session from where the container is launched. This vulnerability is fixed in 5.8.4 and 6.0.0.

Affected

Product or packageVersionsReported by
podman-container-tools podman>= 1.8.1, < 5.8.4CVE List
github.com/containers/podman/v5 (Go)before 5.8.4GitHub Advisory Database, Go Vulnerability Database
go.podman.io/podman/v6 (Go)before 6.0.0GitHub Advisory Database, Go Vulnerability Database
github.com/containers/podman/v4 (Go)up to 4.9.5, all versionsGitHub Advisory Database, Go Vulnerability Database
github.com/containers/podman/v3 (Go)up to 3.4.7, all versionsGitHub Advisory Database, Go Vulnerability Database
github.com/containers/podman/v2 (Go)up to 2.2.1, all versionsGitHub Advisory Database, Go Vulnerability Database
github.com/containers/podman (Go)from 1.8.1, all versionsGitHub Advisory Database, Go Vulnerability Database
github.com/containers/libpod (Go)from 1.8.1Go Vulnerability Database
podman_project podmanfrom 1.8.1 before 5.8.4, 6.0.0NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-200CWE-668

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Podman is a tool for managing OCI containers and pods. From 1.8.1 until 5.8.4, a container image that contains a environment variable with just a key and no value can trick podman into passing that variable from the host into the container. This is made worse by the fact that using an asterisk (*) will cause podman to pass all host variables into the container. So essentially a malicious image can exfiltrate all podman environment variables that are set in the session from where the container is launched. This vulnerability is fixed in 5.8.4 and 6.0.0.

GitHub Advisory Database

Summary

An container image that contains a environment variable with just a key and no value can trick podman into passing that variable from the host into the container. This is made worse by the fact that using an asterisk (*) will cause podman to pass all host variables into the container. So essentially a malicious image can exfiltrate all podman environment variables that are set in the session from where the container is launched.

Details

podman run allows --env VAR1 or --env VAR* which will read the variable values from the current environment and then passes them into the container. However because the same parsing logic was reused for the image config env section that means that an image variable could also gain access to that.

Patch

That image spec requires the env variables to be in the form of key=value, so to address this invalid formatted variables get rejected and the container will not run.

Fixed in https://github.com/podman-container-tools/podman/commit/6c431b73dbf8e4b20b778644d7a80caebdb75050

Workaround

Do not run untrusted images. Before running an image consider inspecting the config with podman image inspect --format '{{.Config.Env}}' <image> and check for any variables that do not have a value assigned.

Go Vulnerability Database

Podman: Malformed Image can trick podman run into leaking host environment variables into the container in github.com/containers/libpod

NVD (es)

Podman es una herramienta para gestionar contenedores OCI y pods. Desde la versión 1.8.1 hasta la 5.8.4, una imagen de contenedor que contiene una variable de entorno con solo una clave y sin valor puede engañar a Podman para que pase esa variable del host al contenedor. Esto se agrava por el hecho de que usar un asterisco (*) hará que Podman pase todas las variables del host al contenedor. Así, esencialmente, una imagen maliciosa puede exfiltrar todas las variables de entorno de Podman que están configuradas en la sesión desde donde se lanza el contenedor. Esta vulnerabilidad está corregida en las versiones 5.8.4 y 6.0.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-57231 changed 2026-06-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-4hq8-gpf5-8p68 changed 2026-10-01CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6594 changed 2026-10-01CC-BY-4.0
NVDCVE-2026-57231 changed 2026-10-25Public domain