Podman: Malformed Image can trick podman run into leaking host environment variables into the containerGHSA-4hq8-gpf5-8p68
HIGHFix: podman-container-tools/podman@6c431b7GHSA-4hq8-gpf5-8p68 is a high-severity (CVSS 7.5) Information Exposure vulnerability in github.com/containers/podman/v5. A fix is available for github.com/containers/podman/v5 — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-4hq8-gpf5-8p68.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
GHSA-4hq8-gpf5-8p68 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
github.com/containers/podman/v5🐹go.podman.io/podman/v6🐹github.com/containers/podman/v4🐹github.com/containers/podman/v3🐹github.com/containers/podman/v2🐹github.com/containers/podmanReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/containers/podman/v5 | all versions | 5.8.4go get github.com/containers/podman/v5@v5.8.4 |
| 🐹Go | go.podman.io/podman/v6 | all versions | 6.0.0go get go.podman.io/podman/v6@v6.0.0 |
| 🐹Go | github.com/containers/podman/v4 | all versions | No fix |
| 🐹Go | github.com/containers/podman/v3 | all versions | No fix |
| 🐹Go | github.com/containers/podman/v2 | all versions | No fix |
| 🐹Go | github.com/containers/podman | ≥ 1.8.1 | No fix |
Affected Products
podmanpodman_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/containers/podman/v5, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/containers/podman/v5 to 5.8.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-4hq8-gpf5-8p68 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.Source: Red Hat security advisory for GHSA-4hq8-gpf5-8p68 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 10 | podman-7:5.8.2-4.el10_2 | RHSA-2026:37072 |
| Red Hat Enterprise Linux 8 | container-tools:rhel8-8100020260709093628.afee755d | RHSA-2026:38504 |
| Red Hat Enterprise Linux 9 | podman-6:5.8.2-4.el9_8 | RHSA-2026:37123 |
| Red Hat OpenShift Container Platform 4.22 | openshift/ose-rhel-coreos-9:4.22.9.8.202607220526-0 | RHSA-2026:44232 |
| Red Hat Hardened Images | podman-main-6.0.0-1.hum1 | RHSA-2026:29954 |
| Red Hat Quay 3.10 | quay/quay-rhel8:1786395065 | RHSA-2026:53520 |
| Red Hat Quay 3.12 | quay/quay-rhel8:1786170635 | RHSA-2026:52968 |
| Red Hat Quay 3.14 | quay/quay-rhel8:1788593843 | RHSA-2026:70267 |
Frequently Asked Questions
Is GHSA-4hq8-gpf5-8p68 in your dependencies?
Find it across Go, including transitive dependencies.