CVE-2025-6032:
Podman Improper Certificate Validation; machine missing TLS verification
8.4
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/containers/podman/v5 | go | < 5.5.2 | 5.5.2 |
github.com/containers/podman/v4 | go | >= 4.8.0, <= 4.9.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper TLS certificate validation when Podman downloads VM images for 'podman machine init'. The root cause was identified in the way the 'types.SystemContext' was being initialized in two key functions: 'Pull' and 'getDestArtifact' within the 'pkg/machine/ocipull' package.
In both functions, a boolean field 'TLSVerify' was used to control TLS verification. The logic DockerInsecureSkipTLSVerify: types.NewOptionalBool(!options.TLSVerify)
was flawed. In Go, the default value for a boolean is false
. Consequently, if the TLSVerify
option was not explicitly set to true
by the caller, it would default to false
, causing !options.TLSVerify
to evaluate to true
. This resulted in DockerInsecureSkipTLSVerify
being set to true
, effectively disabling TLS certificate validation during the image download process.
This insecure default behavior exposed users of podman machine init
to Man-in-the-Middle (MITM) attacks, where an attacker could intercept the connection to the OCI registry and provide a malicious VM image.
The patch addresses this by replacing the TLSVerify
boolean with a types.OptionalBool
named SkipTLSVerify
. This change makes the intention clearer and shifts the logic to be secure by default. The DockerInsecureSkipTLSVerify
field is now set directly from options.SkipTLSVerify
, which, if not provided, defaults to false
, thus enabling TLS verification. Any engineer with this CVE in their environment should understand that any podman machine init
command that pulls a VM image from a remote registry without explicitly enabling TLS verification is vulnerable.
Vulnerable functions
github.com/containers/podman/v5/pkg/machine/ocipull.Pull
pkg/machine/ocipull/pull.go
github.com/containers/podman/v5/pkg/machine/ocipull.(*OCIArtifactDisk).getDestArtifact
pkg/machine/ocipull/ociartifact.go