# CVE-2020-10696: Path Traversal in Buildah

> Attackers can write arbitrary files to a user's system by tricking them into building a malicious container image with Buildah.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 31 Mar 2020
- **Updated:** 4 Aug 2024
- **Also known as:** ALSA-2020:1926, ALSA-2020:1931, ALSA-2020:1932, CLEANSTART-2024-DG53593, DEBIAN-CVE-2020-10696, GHSA-fx8w-mjvm-hvpc, GO-2022-0828, RHBA-2020:0582, RHSA-2020:1401, RHSA-2020:1449, RHSA-2020:1926, RHSA-2020:1931, RHSA-2020:1932, RLSA-2020:1926, RLSA-2020:1931, RLSA-2020:1932

## What is CVE-2020-10696?

CVE-2020-10696 is a high-severity path traversal vulnerability in Redhat Enterprise Linux, published on 31 Mar 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A path traversal flaw was found in Buildah in versions before 1.14.5. This flaw allows an attacker to trick a user into building a malicious container image hosted on an HTTP(s) server and then write files to the user's system anywhere that the user has permissions.

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

## Which versions are affected by CVE-2020-10696?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/containers/buildah` | Go | All versions | 1.14.4 |
| `github.com/containers/buildah` | Go | All versions | 1.14.4 |
| `github.com/containers/buildah` | Go | All versions | 1.14.4 |
| `cockpit-podman` | AlmaLinux:8 | All versions | 11-1.module_el8.5.0+108+00865455 |
| `cockpit-podman` | AlmaLinux:8 | All versions | 11-1.module_el8.5.0+2635+e4386a39 |
| `container-selinux` | AlmaLinux:8 | All versions | 2:2.124.0-1.gitf958d0c.module_el8.3.0+2044+12421f43 |
| `containernetworking-plugins` | AlmaLinux:8 | All versions | 0.8.3-4.module_el8.5.0+108+00865455 |
| `containernetworking-plugins` | AlmaLinux:8 | All versions | 0.8.3-4.module_el8.5.0+2635+e4386a39 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.3.0+2044+12421f43 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.3.0+2044+12421f43 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.3.0+2044+12421f43 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.4.0+2496+12421f43 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.4.0+2496+12421f43 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.4.0+2496+12421f43 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.5.0+119+9a9ec082 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.5.0+119+9a9ec082 |
| `crit` | AlmaLinux:8 | All versions | 3.12-9.module_el8.5.0+119+9a9ec082 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.3.0+2044+12421f43 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.3.0+2044+12421f43 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.3.0+2044+12421f43 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.4.0+2496+12421f43 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.4.0+2496+12421f43 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.4.0+2496+12421f43 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.5.0+119+9a9ec082 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.5.0+119+9a9ec082 |
| `criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.5.0+119+9a9ec082 |
| `fuse-overlayfs` | AlmaLinux:8 | All versions | 0.3-5.module_el8.3.0+2044+12421f43 |
| `fuse-overlayfs` | AlmaLinux:8 | All versions | 0.3-5.module_el8.4.0+2496+12421f43 |
| `fuse-overlayfs` | AlmaLinux:8 | All versions | 0.3-5.module_el8.5.0+119+9a9ec082 |
| `oci-systemd-hook` | AlmaLinux:8 | All versions | 1:0.1.15-2.git2d0b8a3.module_el8.3.0+2044+12421f43 |
| `oci-systemd-hook` | AlmaLinux:8 | All versions | 1:0.1.15-2.git2d0b8a3.module_el8.4.0+2496+12421f43 |
| `oci-systemd-hook` | AlmaLinux:8 | All versions | 1:0.1.15-2.git2d0b8a3.module_el8.5.0+119+9a9ec082 |
| `oci-umount` | AlmaLinux:8 | All versions | 2:2.3.4-2.git87f9237.module_el8.3.0+2044+12421f43 |
| `oci-umount` | AlmaLinux:8 | All versions | 2:2.3.4-2.git87f9237.module_el8.4.0+2496+12421f43 |
| `oci-umount` | AlmaLinux:8 | All versions | 2:2.3.4-2.git87f9237.module_el8.5.0+119+9a9ec082 |
| `python-podman-api` | AlmaLinux:8 | All versions | 1.2.0-0.2.gitd0a45fe.module_el8.5.0+108+00865455 |
| `python-podman-api` | AlmaLinux:8 | All versions | 1.2.0-0.2.gitd0a45fe.module_el8.5.0+108+00865455 |
| `python-podman-api` | AlmaLinux:8 | All versions | 1.2.0-0.2.gitd0a45fe.module_el8.5.0+2635+e4386a39 |
| `python-podman-api` | AlmaLinux:8 | All versions | 1.2.0-0.2.gitd0a45fe.module_el8.5.0+2635+e4386a39 |
| `python3-criu` | AlmaLinux:8 | All versions | 3.12-9.module_el8.3.0+2044+12421f43 |

Products: Buildah Project Buildah, Redhat Enterprise Linux, Redhat Openshift Container Platform.

## How do I fix CVE-2020-10696?

Upgrade github.com/containers/buildah to 1.14.4 or later.

## Is CVE-2020-10696 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux

- [CVE-2024-9675](https://insights.sbomify.com/CVE-2024-9675/): Buildah: buildah allows arbitrary directory mount (high 7.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-2020-10696 and fix it if it is affected.

What it is: CVE-2020-10696 is a high-severity path traversal vulnerability in Redhat Enterprise Linux, published on 31 Mar 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2020-10696 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/containers/buildah (Go): affected all versions; fixed in 1.14.4
- github.com/containers/buildah (Go): affected all versions; fixed in 1.14.4
- github.com/containers/buildah (Go): affected all versions; fixed in 1.14.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-2020-10696/ (Markdown: https://insights.sbomify.com/CVE-2020-10696/index.md)
```

## Sources

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

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