CVE-2024-9675: Buildah: buildah allows arbitrary directory mount
A vulnerability was found in Buildah. Cache mounts do not properly validate that user-specified paths for the cache are within our cache directory, allowing a RUN instruction in a Container file to mount an arbitrary directory from the host (read/write) into the container as long as those files can be accessed by the user running Buildah.
Other sources
Cache mounts (--mount type=cache,id=...) in Buildah and podman build do not properly validate that user-specified paths for the cache are within our cache directory, allowing a RUN instruction in a Containerfile to mount an arbitrary directory from the host (read/write) into the container as long as those files can be accessed by the user running Buildah. This codepath automatically performs an SELinux relabel on the directory in question to ensure the build has access to it, so SELinux does not stop this.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/containers/buildahto a version that resolves this vulnerability.Fixed in 1.38.0
Event History
Frequently Asked Questions
What is the severity of CVE-2024-9675?
CVE-2024-9675 is considered a critical severity vulnerability due to its potential exploitation allowing unauthorized access to sensitive file paths.
How do I fix CVE-2024-9675?
To remediate CVE-2024-9675, update to Buildah version 1.38.0 or later which includes the necessary patches.
Which software is affected by CVE-2024-9675?
CVE-2024-9675 affects Buildah and various versions of Red Hat OpenShift and Red Hat Enterprise Linux.
What could happen if CVE-2024-9675 is exploited?
Exploitation of CVE-2024-9675 allows an attacker to mount arbitrary directories from the host to the container with read and write access.
Is CVE-2024-9675 a local or remote vulnerability?
CVE-2024-9675 is classified as a local vulnerability, requiring access to the host system to exploit.