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. 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}}' ` and check for any variables that do not have a value assigned.
GHSA-4hq8-gpf5-8p68
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-4hq8-gpf5-8p68
github.com/containers/podman/v5
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 5.8.4
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
go.podman.io/podman/v6
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 6.0.0
Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
github.com/containers/podman/v4
Source reference: /affected/2/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
github.com/containers/podman/v3
Source reference: /affected/3/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
github.com/containers/podman/v2
Source reference: /affected/4/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
github.com/containers/podman
Source reference: /affected/5/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.8.4"
}
]
}
],
"package": {
"name": "github.com/containers/podman/v5",
"purl": "pkg:golang/github.com/containers/podman/v5",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-4hq8-gpf5-8p68/GHSA-4hq8-gpf5-8p68.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "6.0.0"
}
]
}
],
"package": {
"name": "go.podman.io/podman/v6",
"purl": "pkg:golang/go.podman.io/podman/v6",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-4hq8-gpf5-8p68/GHSA-4hq8-gpf5-8p68.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"last_affected": "4.9.5"
}
]
}
],
"package": {
"name": "github.com/containers/podman/v4",
"purl": "pkg:golang/github.com/containers/podman/v4",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-4hq8-gpf5-8p68/GHSA-4hq8-gpf5-8p68.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"last_affected": "3.4.7"
}
]
}
],
"package": {
"name": "github.com/containers/podman/v3",
"purl": "pkg:golang/github.com/containers/podman/v3",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-4hq8-gpf5-8p68/GHSA-4hq8-gpf5-8p68.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.2.1"
}
]
}
],
"package": {
"name": "github.com/containers/podman/v2",
"purl": "pkg:golang/github.com/containers/podman/v2",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-4hq8-gpf5-8p68/GHSA-4hq8-gpf5-8p68.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "1.8.1"
}
]
}
],
"package": {
"name": "github.com/containers/podman",
"purl": "pkg:golang/github.com/containers/podman",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-4hq8-gpf5-8p68/GHSA-4hq8-gpf5-8p68.json",
"last_known_affected_version_range": "< 5.8.4"
}
}
]- Related CVEs
- CVE-2026-57231
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #63905 · Revision 1
- Added to Heist Feed
- Publisher date