# CVE-2024-9675: Buildah: buildah allows arbitrary directory mount

> Attackers can mount arbitrary host directories into containers via malicious RUN instructions, enabling unauthorized host file access and modification.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 9 Oct 2024
- **Updated:** 7 Aug 2026
- **Also known as:** ALSA-2024:8563, AZL-110330, BELL-CVE-2024-9675, CLEANSTART-2024-MU39108, CLSA-2025-1745426658, DEBIAN-CVE-2024-9675, GHSA-586p-749j-fhwp, GO-2024-3186, RHSA-2024:8563, RHSA-2024:8675, RHSA-2024:8679, RHSA-2024:8703, RHSA-2024:8707, RHSA-2024:8708, RHSA-2024:8709, RHSA-2024:8994, RLSA-2024:8563, SUSE-SU-2024:3728-1, UBUNTU-CVE-2024-9675, openSUSE-SU-2024:14405-1, openSUSE-SU-2024:14409-1

## What is CVE-2024-9675?

CVE-2024-9675 is a high-severity path traversal vulnerability in Redhat Enterprise Linux, published on 9 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2024-9675?

3 open source packages ship an affected version, including github.com/containers/buildah. It affects 14 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/containers/buildah` | Go | All versions | 1.37.1 |
| `github.com/containers/buildah` | Go | All versions | 1.38.0 |
| `github.com/containers/buildah` | Go | All versions | 1.38.0 |
| `buildah` | AlmaLinux:9 | All versions | 2:1.33.10-1.el9_4 |
| `buildah-tests` | AlmaLinux:9 | All versions | 2:1.33.10-1.el9_4 |
| `buildah` | Red Hat:enterprise_linux:9::appstream | All versions | 2:1.33.10-1.el9_4 |
| `buildah-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 2:1.33.10-1.el9_4 |
| `buildah-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 2:1.33.10-1.el9_4 |
| `buildah-tests` | Red Hat:enterprise_linux:9::appstream | All versions | 2:1.33.10-1.el9_4 |
| `buildah-tests-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 2:1.33.10-1.el9_4 |
| `podman` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-catatonit` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-catatonit-debuginfo` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-debuginfo` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-debugsource` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-docker` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-gvproxy` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-gvproxy-debuginfo` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-plugins` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-plugins-debuginfo` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-remote` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-remote-debuginfo` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman-tests` | Red Hat:openshift:4.15::el8 | All versions | 3:4.4.1-32.rhaos4.15.el8 |
| `podman` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-debuginfo` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-debugsource` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-docker` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-gvproxy` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-gvproxy-debuginfo` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-plugins` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-plugins-debuginfo` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-remote` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-remote-debuginfo` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `podman-tests` | Red Hat:openshift:4.15::el9 | All versions | 3:4.4.1-32.rhaos4.15.el9 |
| `aardvark-dns` | Red Hat:rhel_aus:8.6::appstream | All versions | 2:1.0.1-40.module+el8.6.0+22399+813f5137 |
| `buildah` | Red Hat:rhel_aus:8.6::appstream | All versions | 1:1.26.8-1.module+el8.6.0+22399+813f5137 |
| `buildah-debuginfo` | Red Hat:rhel_aus:8.6::appstream | All versions | 1:1.26.8-1.module+el8.6.0+22399+813f5137 |
| `buildah-debugsource` | Red Hat:rhel_aus:8.6::appstream | All versions | 1:1.26.8-1.module+el8.6.0+22399+813f5137 |
| `buildah-tests` | Red Hat:rhel_aus:8.6::appstream | All versions | 1:1.26.8-1.module+el8.6.0+22399+813f5137 |
| `buildah-tests-debuginfo` | Red Hat:rhel_aus:8.6::appstream | All versions | 1:1.26.8-1.module+el8.6.0+22399+813f5137 |

Products: Buildah Project Buildah, Redhat Enterprise Linux, Redhat Enterprise Linux Eus, Redhat Enterprise Linux for Arm 64, Redhat Enterprise Linux for Arm 64 Eus, Redhat Enterprise Linux for Ibm Z Systems, Redhat Enterprise Linux for Ibm Z Systems Eus, Redhat Enterprise Linux for Power Little Endian, Redhat Enterprise Linux for Power Little Endian Eus, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server for Power Little Endian Update Services for Sap Solutions, Redhat Enterprise Linux Server Tus, Redhat Enterprise Linux Update Services for Sap Solutions, Redhat Openshift Container Platform.

## How do I fix CVE-2024-9675?

Upgrade github.com/containers/buildah to a fixed version for your release line: 1.37.1 or 1.38.0.

## Is CVE-2024-9675 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux

- [CVE-2020-10696](https://insights.sbomify.com/CVE-2020-10696/): Path Traversal in Buildah (high 8.8)
- [CVE-2022-2990](https://insights.sbomify.com/CVE-2022-2990/): Buildah's incorrect handling of the supplementary groups may lead to data disclosure, modification (high 7.1)
- [CVE-2022-27651](https://insights.sbomify.com/CVE-2022-27651/): Non-empty default inheritable capabilities for linux container in Buildah (medium 6.8)
- [CVE-2019-10214](https://insights.sbomify.com/CVE-2019-10214/): containers/image library Insufficiently Protects Credentials (medium 6.4)
- [CVE-2021-3602](https://insights.sbomify.com/CVE-2021-3602/): Buildah processes using chroot isolation may leak environment values to intermediate processes (medium 5.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-9675 and fix it if it is affected.

What it is: CVE-2024-9675 is a high-severity path traversal vulnerability in Redhat Enterprise Linux, published on 9 Oct 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-9675 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/containers/buildah (Go): affected all versions; fixed in 1.37.1
- github.com/containers/buildah (Go): affected all versions; fixed in 1.38.0
- github.com/containers/buildah (Go): affected all versions; fixed in 1.38.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-9675/ (Markdown: https://insights.sbomify.com/CVE-2024-9675/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-9675
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-9675
- OSV: https://osv.dev/vulnerability/CVE-2024-9675

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-9675/
Summaries are generated and may contain mistakes; the official description above is the record.
