Summary
Podman: Malformed Image can trick podman run into leaking host environment variables into the container
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.
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.
Impact
CVE-2026-57231 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.8.4, 6.0.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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
Frequently Asked Questions
- What is CVE-2026-57231? CVE-2026-57231 is a high-severity security vulnerability in github.com/containers/podman/v5 (go), affecting versions < 5.8.4. It is fixed in 5.8.4, 6.0.0.
- How severe is CVE-2026-57231? CVE-2026-57231 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2026-57231?
github.com/containers/podman/v5(go) (versions < 5.8.4)go.podman.io/podman/v6(go) (versions < 6.0.0)github.com/containers/podman/v4(go) (versions <= 4.9.5)github.com/containers/podman/v3(go) (versions <= 3.4.7)github.com/containers/podman/v2(go) (versions <= 2.2.1)github.com/containers/podman(go) (versions >= 1.8.1, < 5.8.4)
- Is there a fix for CVE-2026-57231? Yes. CVE-2026-57231 is fixed in 5.8.4, 6.0.0. Upgrade to this version or later.
- Is CVE-2026-57231 exploitable, and should I be worried? Whether CVE-2026-57231 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-57231 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-57231?
- Upgrade
github.com/containers/podman/v5to 5.8.4 or later - Upgrade
go.podman.io/podman/v6to 6.0.0 or later
- Upgrade