# CVE-2019-18466: Podman Symlink Vulnerability

> An attacker can craft a container image with symlinks that, when copied to the host, overwrite host files due to improper symlink resolution.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 28 Oct 2019
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-r34v-gqmw-qvgj, GO-2023-1942, SUSE-SU-2020:0697-1, openSUSE-SU-2020:0398-1

## What is CVE-2019-18466?

CVE-2019-18466 is a medium-severity path traversal vulnerability in n/a, published on 28 Oct 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

An issue was discovered in Podman in libpod before 1.6.0. It resolves a symlink in the host context during a copy operation from the container to the host, because an undesired glob operation occurs. An attacker could create a container image containing particular symlinks that, when copied by a victim user to the host filesystem, may overwrite existing files with others from the host.

Weakness: CWE-59 (Improper Link Resolution Before File Access)

## Which versions are affected by CVE-2019-18466?

7 open source packages ship an affected version, including github.com/containers/podman/v4, github.com/containers/libpod and github.com/containers/podman. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/containers/podman/v4` | Go | All versions | None |
| `github.com/containers/podman/v4` | Go | All versions | 1.6.0 |
| `github.com/containers/podman/v4` | Go | All versions | 1.6.0 |
| `github.com/containers/libpod` | Go | All versions | 1.6.0 |
| `github.com/containers/podman` | Go | All versions | None |
| `github.com/containers/podman/v2` | Go | All versions | None |
| `github.com/containers/podman/v3` | Go | All versions | None |
| `cni` | SUSE:Linux Enterprise Module for Containers 15 SP1 | All versions | 0.7.1-3.3.1 |
| `cni-plugins` | SUSE:Linux Enterprise Module for Containers 15 SP1 | All versions | 0.8.4-3.3.1 |
| `conmon` | SUSE:Linux Enterprise Module for Containers 15 SP1 | All versions | 2.0.10-3.3.1 |
| `fuse-overlayfs` | SUSE:Linux Enterprise Module for Containers 15 SP1 | All versions | 0.7.6-3.6.1 |
| `podman` | SUSE:Linux Enterprise Module for Containers 15 SP1 | All versions | 1.8.0-4.14.1 |
| `cni` | SUSE:Linux Enterprise Module for Public Cloud 15 SP1 | All versions | 0.7.1-3.3.1 |
| `cni-plugins` | SUSE:Linux Enterprise Module for Public Cloud 15 SP1 | All versions | 0.8.4-3.3.1 |
| `cni` | openSUSE:Leap 15.1 | All versions | 0.7.1-lp151.2.3.1 |
| `cni-plugins` | openSUSE:Leap 15.1 | All versions | 0.8.4-lp151.2.3.1 |
| `conmon` | openSUSE:Leap 15.1 | All versions | 2.0.10-lp151.2.1 |
| `fuse-overlayfs` | openSUSE:Leap 15.1 | All versions | 0.7.6-lp151.5.1 |
| `podman` | openSUSE:Leap 15.1 | All versions | 1.8.0-lp151.3.9.1 |

Products: Libpod Project Libpod.

## How do I fix CVE-2019-18466?

Upgrade github.com/containers/podman/v4 to 1.6.0 or later.

## Is CVE-2019-18466 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2019-10152](https://insights.sbomify.com/CVE-2019-10152/): Podman Path Traversal Vulnerability leads to arbitrary file read/write (high 7.5)
- [CVE-2020-1726](https://insights.sbomify.com/CVE-2020-1726/): Podman has Files or Directories Accessible to External Parties (medium 5.9)
- [CVE-2018-10856](https://insights.sbomify.com/CVE-2018-10856/): Podman Elevated Container Privileges (medium 5.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-18466 and fix it if it is affected.

What it is: CVE-2019-18466 is a medium-severity path traversal vulnerability in n/a, published on 28 Oct 2019. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2019-18466 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/containers/podman/v4 (Go): affected all versions; no fix listed
- github.com/containers/podman/v4 (Go): affected all versions; fixed in 1.6.0
- github.com/containers/podman/v4 (Go): affected all versions; fixed in 1.6.0
- github.com/containers/libpod (Go): affected all versions; fixed in 1.6.0
- github.com/containers/podman (Go): affected all versions; no fix listed
- github.com/containers/podman/v2 (Go): affected all versions; no fix listed
- github.com/containers/podman/v3 (Go): affected all versions; no fix listed

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

## Sources

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

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