# 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.

- **Severity:** Medium 4.7 (`CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Oct 2024
- **Updated:** 22 Oct 2026
- **Also known as:** AZL-108011, AZL-50262, AZL-50268, BELL-CVE-2024-9407, CLEANSTART-2024-AV70619, CLSA-2025-1756932191, DEBIAN-CVE-2024-9407, GHSA-fhqq-8f65-5xfc, GO-2024-3169, UBUNTU-CVE-2024-9407

## 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 (Improper Input Validation)

## 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 | Ecosystem | 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 |
| `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.

## Is CVE-2024-9407 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: 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.
Exploitation: There is no known exploitation of CVE-2024-9407 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.4
- github.com/containers/buildah (Go): affected all versions; fixed in 1.37.4
- github.com/containers/buildah (Go): affected all versions; fixed in 1.37.4
- github.com/containers/podman (Go): affected all versions; no fix listed
- github.com/containers/podman (Go): affected all versions; fixed in 5.2.4
- github.com/containers/podman (Go): affected all versions; fixed in 5.2.4
- github.com/containers/podman/v2 (Go): affected all versions; no fix listed
- github.com/containers/podman/v2 (Go): affected all versions; fixed in 5.2.4
- github.com/containers/podman/v2 (Go): affected all versions; fixed in 5.2.4
- github.com/containers/podman/v3 (Go): affected all versions; no fix listed
- github.com/containers/podman/v3 (Go): affected all versions; fixed in 5.2.4
- github.com/containers/podman/v3 (Go): affected all versions; fixed in 5.2.4

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-9407/ (Markdown: https://insights.sbomify.com/CVE-2024-9407/index.md)
```

## Sources

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

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