CVE-2024-9407 Buildah: podman: improper input validation in bind-propagation option of dockerfile run --mount instruction
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.
| Package | Affected | Fixed in |
|---|---|---|
github.com/containers/buildah Go | All versions | 1.37.4 |
github.com/containers/buildah Go | All versions | 1.37.4 |
github.com/containers/buildah Go | All versions | 1.37.4 |
github.com/containers/podman Go | All versions | None |
github.com/containers/podman Go | All versions | 5.2.4 |
github.com/containers/podman Go | All versions | 5.2.4 |
12 more packages
github.com/containers/podman/v2 Go | All versions | None |
github.com/containers/podman/v2 Go | All versions | 5.2.4 |
github.com/containers/podman/v2 Go | All versions | 5.2.4 |
github.com/containers/podman/v3 Go | All versions | None |
github.com/containers/podman/v3 Go | All versions | 5.2.4 |
github.com/containers/podman/v3 Go | All versions | 5.2.4 |
github.com/containers/podman/v4 Go | All versions | None |
github.com/containers/podman/v4 Go | All versions | 5.2.4 |
github.com/containers/podman/v4 Go | All versions | 5.2.4 |
github.com/containers/podman/v5 Go | All versions | 5.2.4 |
github.com/containers/podman/v5 Go | All versions | 5.2.4 |
github.com/containers/podman/v5 Go | All versions | 5.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.