# CVE-2023-0778: Podman Time-of-check Time-of-use (TOCTOU) Race Condition

> A race condition in Podman allows attackers to replace files with symlinks during volume export, enabling arbitrary host file access.

- **Severity:** Medium 6.8 (`CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 27 Mar 2023
- **Updated:** 24 Feb 2025
- **Also known as:** AZL-39612, AZL-43612, AZL-45381, BELL-CVE-2023-0778, DEBIAN-CVE-2023-0778, GHSA-qwqv-rqgf-8qh8, GO-2023-1681, SUSE-SU-2023:1812-1, SUSE-SU-2023:1814-1, UBUNTU-CVE-2023-0778, openSUSE-SU-2024:12771-1

## What is CVE-2023-0778?

CVE-2023-0778 is a medium-severity vulnerability in Redhat Enterprise Linux, published on 27 Mar 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A Time-of-check Time-of-use (TOCTOU) flaw was found in podman. This issue may allow a malicious user to replace a normal file in a volume with a symlink while exporting the volume, allowing for access to arbitrary files on the host file system.

Weakness: CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition)

## Which versions are affected by CVE-2023-0778?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/containers/podman/v4` | Go | All versions | 4.4.2 |
| `github.com/containers/podman/v4` | Go | All versions | 4.4.2 |
| `github.com/containers/podman/v4` | Go | All versions | 4.4.2 |
| `podman` | SUSE:Enterprise Storage 7.1 | All versions | 4.4.4-150300.9.20.1 |
| `podman` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 4.4.4-150300.9.20.1 |
| `podman` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 4.4.4-150300.9.20.1 |
| `podman` | SUSE:Linux Enterprise Micro 5.1 | All versions | 4.4.4-150300.9.20.1 |
| `podman` | SUSE:Linux Enterprise Micro 5.2 | All versions | 4.4.4-150300.9.20.1 |
| `podman` | SUSE:Linux Enterprise Micro 5.3 | All versions | 4.4.4-150400.4.16.1 |
| `podman` | SUSE:Linux Enterprise Micro 5.4 | All versions | 4.4.4-150400.4.16.1 |
| `podman` | SUSE:Linux Enterprise Module for Containers 15 SP4 | All versions | 4.4.4-150400.4.16.1 |
| `podman` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 4.4.4-150300.9.20.1 |
| `podman` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 4.4.4-150300.9.20.1 |
| `podman` | openSUSE:Leap 15.4 | All versions | 4.4.4-150400.4.16.1 |
| `podman` | openSUSE:Leap Micro 5.3 | All versions | 4.4.4-150400.4.16.1 |
| `podman` | openSUSE:Tumbleweed | All versions | 4.4.2-1.1 |

Products: Podman Project Podman, Redhat Enterprise Linux.

## How do I fix CVE-2023-0778?

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

## Is CVE-2023-0778 being exploited?

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

## Other vulnerabilities in Redhat Enterprise Linux

- [CVE-2026-57231](https://insights.sbomify.com/CVE-2026-57231/): Podman: Malformed Image can trick podman run into leaking host environment variables into the container (high 7.5)
- [CVE-2022-2738](https://insights.sbomify.com/CVE-2022-2738/): Use after free in podman (high 7.5)
- [CVE-2022-2989](https://insights.sbomify.com/CVE-2022-2989/): Podman's incorrect handling of the supplementary groups may lead to data disclosure, modification (high 7.1)
- [CVE-2021-20188](https://insights.sbomify.com/CVE-2021-20188/): Improper Authorization in github.com/containers/libpod (high 7.0)
- [CVE-2019-25067](https://insights.sbomify.com/CVE-2019-25067/): Podman/Varlink API Privilege Escalation (medium 6.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-0778 and fix it if it is affected.

What it is: CVE-2023-0778 is a medium-severity vulnerability in Redhat Enterprise Linux, published on 27 Mar 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-0778 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/containers/podman/v4 (Go): affected all versions; fixed in 4.4.2
- github.com/containers/podman/v4 (Go): affected all versions; fixed in 4.4.2
- github.com/containers/podman/v4 (Go): affected all versions; fixed in 4.4.2

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

## Sources

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

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