CVE-2024-9407 Buildah: podman: improper input validation in bind-propagation option of dockerfile run --mount instruction

Medium 4.7 Published Updated

Attackers can mount sensitive host directories into containers during build, bypassing SELinux to read or modify host files.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-9407?

CVE-2024-9407 is a medium-severity path traversal vulnerability in Red Hat Enterprise Linux 10, published on 1 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

A vulnerability exists in the bind-propagation option of the Dockerfile RUN --mount instruction. The system does not properly validate the input passed to this option, allowing users to pass arbitrary parameters to the mount instruction. This issue can be exploited to mount sensitive directories from the host into a container during the build process and, in some cases, modify the contents of those mounted files. Even if SELinux is used, this vulnerability can bypass its protection by allowing the source directory to be relabeled to give the container access to host files.

Weakness: CWE-20

Which versions are affected by CVE-2024-9407?

18 open source packages ship an affected version, including github.com/containers/buildah, github.com/containers/podman and github.com/containers/podman/v2.

PackageAffectedFixed in
github.com/containers/buildah GoAll versions1.37.4
github.com/containers/buildah GoAll versions1.37.4
github.com/containers/buildah GoAll versions1.37.4
github.com/containers/podman GoAll versionsNone
github.com/containers/podman GoAll versions5.2.4
github.com/containers/podman GoAll versions5.2.4
12 more packages
github.com/containers/podman/v2 GoAll versionsNone
github.com/containers/podman/v2 GoAll versions5.2.4
github.com/containers/podman/v2 GoAll versions5.2.4
github.com/containers/podman/v3 GoAll versionsNone
github.com/containers/podman/v3 GoAll versions5.2.4
github.com/containers/podman/v3 GoAll versions5.2.4
github.com/containers/podman/v4 GoAll versionsNone
github.com/containers/podman/v4 GoAll versions5.2.4
github.com/containers/podman/v4 GoAll versions5.2.4
github.com/containers/podman/v5 GoAll versions5.2.4
github.com/containers/podman/v5 GoAll versions5.2.4
github.com/containers/podman/v5 GoAll versions5.2.4

How do I fix CVE-2024-9407?

Upgrade github.com/containers/buildah to 1.37.4 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-9407 being exploited?

There is no known exploitation of CVE-2024-9407 in the wild and no public exploit code.

Sources

Also known as AZL-108011, AZL-50262, AZL-50268, BELL-CVE-2024-9407, CLEANSTART-2024-AV70619, CLSA-2025-1756932191 and 4 more.

Is CVE-2024-9407 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free