# CVE-2024-9675: containers Buildah path traversal in cache mounts

Source: https://junglewise.ai/threats/cve-2024-9675-containers-buildah-path-traversal-in-cache-mounts  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-10-09. Updated: 2026-08-07  
License: CC BY 4.0 with a link back

CVE-2024-9675 · Severity: medium · CVSS 4.4 · Published 2024-10-09

Buildah is a tool used to create and manage container images. A security flaw allows a user to bypass restrictions and gain unauthorized access to files on the host computer by mounting them into a container during the build process. This could lead to the exposure or modification of sensitive data if the user running the build has access to those files on the host system.

Technologies: [github.com/containers/buildah (Go)](https://junglewise.ai/threats/technologies/github-com-containers-buildah). Vendors: [Containers](https://junglewise.ai/threats/vendors/containers), [Go](https://junglewise.ai/threats/vendors/go).

## Quick answers

**Is CVE-2024-9675 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-9675 being exploited in the wild.

**How severe is CVE-2024-9675?** Medium severity, with a CVSS score of 4.4, published 9 October 2024.

**Which products and versions are affected?** Containers Buildah < 1.38.0; github.com/containers/buildah (Go) < 1.38.0, SEMVER:introduced=0,fixed=1.37.1, SEMVER:introduced=0,fixed=1.38.0.

**Is there a fix for CVE-2024-9675?** Yes. github.com/containers/buildah (Go): upgrade to 1.37.1, 1.38.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2024-9675 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2024-9675?** Check whether you run Containers Buildah or github.com/containers/buildah (Go) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/containers/buildah (Go): upgrade to 1.37.1, 1.38.0 or later

  ```sh
  go get github.com/containers/buildah@v1.38.0
  ```


## Technical details

A path traversal vulnerability (CWE-22) exists in Buildah's cache mount implementation. The software fails to properly validate that user-specified paths for cache mounts are restricted to the designated cache directory. An attacker with the ability to provide a Containerfile can use a `RUN` instruction to mount arbitrary host directories with read/write permissions, provided the user executing Buildah has the necessary filesystem permissions for those host paths. This allows for unauthorized data access or modification on the host system. The issue is resolved in Buildah version 1.38.0.

## Affected products

- containers Buildah < 1.38.0

## Identifiers

- CVE-2024-9675
- GHSA-586p-749j-fhwp
- GO-2024-3186

## Timeline

- 2024-10-09: disclosed
- 2024-10-09: advisory
- 2024-10-09: patched: Version 1.38.0 released

## References

- [https://access.redhat.com/security/cve/CVE-2024-9675](https://access.redhat.com/security/cve/CVE-2024-9675)
- [https://bugzilla.redhat.com/show_bug.cgi?id=2317458](https://bugzilla.redhat.com/show_bug.cgi?id=2317458)
- [https://github.com/containers/buildah/commit/aa67e5d71ee7ec07122a210baa3b13966a9e086c](https://github.com/containers/buildah/commit/aa67e5d71ee7ec07122a210baa3b13966a9e086c)
- [https://pkg.go.dev/vuln/GO-2024-3186](https://pkg.go.dev/vuln/GO-2024-3186)
- [https://access.redhat.com/errata/RHSA-2024:8563](https://access.redhat.com/errata/RHSA-2024:8563)

## Related threats

- [Containers Buildah path traversal in build context processing](https://junglewise.ai/threats/cve-2026-44517-containers-buildah-path-traversal-in-build-context-processing)
- [Buildah allows build breakout using malicious Containerfiles and concurrent builds](https://junglewise.ai/threats/cve-2024-11218-buildah-allows-build-breakout-using-malicious-containerfiles-and)
- [GO-2024-3169 - Improper Input Validation in Buildah and Podman in github.com/containers/buildah](https://junglewise.ai/threats/cve-2024-9407-improper-input-validation-in-buildah-and-podman)
- [GO-2022-0828 - Path Traversal in Buildah in github.com/containers/buildah](https://junglewise.ai/threats/cve-2020-10696-path-traversal-in-buildah)
- [GO-2024-2658 - Container escape at build time in github.com/containers/buildah](https://junglewise.ai/threats/cve-2024-1753-podman-affected-by-container-escape-at-build-time)
