CVE-2026-57231: Podman: Malformed Image can trick podman run into leaking host environment variables into the container
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.
Published Sep 24, 2026
Affected packages
github.com/containers/podman/v5
- Ecosystem
- Go
- Affected
- < 5.8.4
- Fixed in
- 5.8.4
- Check
go list -m github.com/containers/podman/v5
go.podman.io/podman/v6
- Ecosystem
- Go
- Affected
- < 6.0.0
- Fixed in
- 6.0.0
- Check
go list -m go.podman.io/podman/v6
github.com/containers/podman/v4
- Ecosystem
- Go
- Affected
- <= 4.9.5
- Fixed in
- No patched version yet
- Check
go list -m github.com/containers/podman/v4
github.com/containers/podman/v3
- Ecosystem
- Go
- Affected
- <= 3.4.7
- Fixed in
- No patched version yet
- Check
go list -m github.com/containers/podman/v3
github.com/containers/podman/v2
- Ecosystem
- Go
- Affected
- <= 2.2.1
- Fixed in
- No patched version yet
- Check
go list -m github.com/containers/podman/v2
github.com/containers/podman
- Ecosystem
- Go
- Affected
- >= 1.8.1, < 5.8.4
- Fixed in
- No patched version yet
- Check
go list -m github.com/containers/podman
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to unknownhad.
References
- https://github.com/podman-container-tools/podman/security/advisories/GHSA-4hq8-gpf5-8p68
- https://nvd.nist.gov/vuln/detail/CVE-2026-57231
- https://github.com/podman-container-tools/podman/commit/6c431b73dbf8e4b20b778644d7a80caebdb75050
- https://github.com/podman-container-tools/podman/releases/tag/v5.8.4
- https://github.com/podman-container-tools/podman/releases/tag/v6.0.0
- https://github.com/advisories/GHSA-4hq8-gpf5-8p68
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-94603
Podman: The `podman run` command can be instructed to disable almost all sandboxing by image annotation
critical10.0Oct 15, 2026CVE-2026-19730
podman quadlet install --replace does not fully replace the old file
medium4.2Sep 24, 2026CVE-2026-55686
Podman: WORKDIR symlink traversal vulnerability
medium5.3No fixJun 18, 2026CVE-2026-33414
PowerShell Command Injection in Podman HyperV Machine
medium7.8No fixApr 14, 2026CVE-2025-4953
Podman Creates Temporary File with Insecure Permissions
high7.4No fixSep 16, 2025CVE-2025-9566
podman kube play symlink traversal vulnerability
high8.1No fixSep 4, 2025
