CVE-2023-0778
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A TOCTOU flaw in Podman allows a malicious user to replace a normal file in a volume with a symlink during export, enabling access to arbitrary host files.
Vulnerability
Overview
CVE-2023-0778 is a Time-of-check Time-of-use (TOCTOU) vulnerability in Podman, a container management tool. The flaw resides in the volume export mechanism: when exporting a container volume, Podman checks the file type of objects within the volume, but a race condition allows a malicious user to replace a regular file with a symlink between the check and the actual use of the file path. This is a classic symlink race or TOCTOU issue [1][3][4].
Exploitation
Scenario
An attacker must have the ability to modify files inside a container volume that is being exported by an administrator or another user. The attack requires local access to the container environment and the ability to time the replacement of a file with a symlink while the export operation is in progress. No special privileges beyond container user access are needed to initiate the race condition [1][4].
Impact
Successful exploitation allows the attacker to trick the export process into following a malicious symlink, thereby reading arbitrary files from the host filesystem. Depending on the permissions of the process performing the export, sensitive system files, credentials, or other confidential data could be exposed to the attacker within the exported volume [1][3].
Mitigation
Red Hat has rated this vulnerability as medium severity. Podman maintainers have addressed the issue in subsequent releases; users should update to the latest patched version of Podman. No workaround was provided beyond ensuring that only trusted users have the ability to create and export container volumes [2][4].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/containers/podman/v4Go | < 4.4.2 | 4.4.2 |
Affected products
49- podman/podmandescription
- ghsa-coords48 versionspkg:golang/github.com/containers/podman/v4pkg:rpm/almalinux/aardvark-dnspkg:rpm/almalinux/buildahpkg:rpm/almalinux/buildah-testspkg:rpm/almalinux/cockpit-podmanpkg:rpm/almalinux/conmonpkg:rpm/almalinux/containernetworking-pluginspkg:rpm/almalinux/containers-commonpkg:rpm/almalinux/container-selinuxpkg:rpm/almalinux/critpkg:rpm/almalinux/criupkg:rpm/almalinux/criu-develpkg:rpm/almalinux/criu-libspkg:rpm/almalinux/crunpkg:rpm/almalinux/fuse-overlayfspkg:rpm/almalinux/libslirppkg:rpm/almalinux/libslirp-develpkg:rpm/almalinux/netavarkpkg:rpm/almalinux/oci-seccomp-bpf-hookpkg:rpm/almalinux/podmanpkg:rpm/almalinux/podman-catatonitpkg:rpm/almalinux/podman-dockerpkg:rpm/almalinux/podman-gvproxypkg:rpm/almalinux/podman-pluginspkg:rpm/almalinux/podman-remotepkg:rpm/almalinux/podman-testspkg:rpm/almalinux/python3-criupkg:rpm/almalinux/python3-podmanpkg:rpm/almalinux/runcpkg:rpm/almalinux/skopeopkg:rpm/almalinux/skopeo-testspkg:rpm/almalinux/slirp4netnspkg:rpm/almalinux/toolboxpkg:rpm/almalinux/toolbox-testspkg:rpm/almalinux/udicapkg:rpm/opensuse/podman&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/podman&distro=openSUSE%20Leap%20Micro%205.3pkg:rpm/opensuse/podman&distro=openSUSE%20Tumbleweedpkg:rpm/suse/podman&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOSpkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Micro%205.1pkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Micro%205.2pkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Micro%205.3pkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Micro%205.4pkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Containers%2015%20SP4pkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3
< 4.4.2+ 47 more
- (no CPE)range: < 4.4.2
- (no CPE)range: < 2:1.5.0-2.module_el8.8.0+3470+252b1910
- (no CPE)range: < 1:1.29.1-1.module_el8.8.0+3470+252b1910
- (no CPE)range: < 1:1.29.1-1.module_el8.8.0+3470+252b1910
- (no CPE)range: < 63.1-1.module_el8.8.0+3557+7ba9cc13
- (no CPE)range: < 3:2.1.6-1.module_el8.8.0+3470+252b1910
- (no CPE)range: < 1:1.2.0-1.module_el8.8.0+3470+252b1910
- (no CPE)range: < 2:1-63.module_el8.8.0+3568+e8578284
- (no CPE)range: < 2:2.205.0-2.module_el8.8.0+3557+7ba9cc13
- (no CPE)range: < 3.15-3.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 3.15-3.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 3.15-3.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 3.15-3.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 1.8.1-2.module_el8.8.0+3568+e8578284
- (no CPE)range: < 1.10-1.module_el8.8.0+3470+252b1910
- (no CPE)range: < 4.4.0-1.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 4.4.0-1.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 2:1.5.0-4.module_el8.8.0+3470+252b1910
- (no CPE)range: < 1.2.8-1.module_el8.8.0+3470+252b1910
- (no CPE)range: < 3:4.4.1-8.module_el8.8.0+3568+e8578284
- (no CPE)range: < 3:4.4.1-8.module_el8.8.0+3568+e8578284
- (no CPE)range: < 3:4.4.1-8.module_el8.8.0+3568+e8578284
- (no CPE)range: < 3:4.4.1-8.module_el8.8.0+3568+e8578284
- (no CPE)range: < 3:4.4.1-8.module_el8.8.0+3568+e8578284
- (no CPE)range: < 3:4.4.1-8.module_el8.8.0+3568+e8578284
- (no CPE)range: < 3:4.4.1-8.module_el8.8.0+3568+e8578284
- (no CPE)range: < 3.15-3.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 4.4.1-1.module_el8.8.0+3470+252b1910
- (no CPE)range: < 1:1.1.4-1.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 2:1.11.2-0.2.module_el8.8.0+3470+252b1910
- (no CPE)range: < 2:1.11.2-0.2.module_el8.8.0+3470+252b1910
- (no CPE)range: < 1.2.0-2.module_el8.7.0+3407+95aa0ca9
- (no CPE)range: < 0.0.99.3-7.module_el8.8.0+3470+252b1910
- (no CPE)range: < 0.0.99.3-7.module_el8.8.0+3470+252b1910
- (no CPE)range: < 0.2.6-20.module_el8.8.0+3470+252b1910
- (no CPE)range: < 4.4.4-150400.4.16.1
- (no CPE)range: < 4.4.4-150400.4.16.1
- (no CPE)range: < 4.4.2-1.1
- (no CPE)range: < 4.4.4-150300.9.20.1
- (no CPE)range: < 4.4.4-150300.9.20.1
- (no CPE)range: < 4.4.4-150300.9.20.1
- (no CPE)range: < 4.4.4-150300.9.20.1
- (no CPE)range: < 4.4.4-150300.9.20.1
- (no CPE)range: < 4.4.4-150400.4.16.1
- (no CPE)range: < 4.4.4-150400.4.16.1
- (no CPE)range: < 4.4.4-150400.4.16.1
- (no CPE)range: < 4.4.4-150300.9.20.1
- (no CPE)range: < 4.4.4-150300.9.20.1
Patches
16ca857feb07avolume,container: chroot to source before exporting content
2 files changed · +26 −3
libpod/container_internal.go+2 −2 modified@@ -34,7 +34,7 @@ import ( "github.com/containers/podman/v4/pkg/systemd/notifyproxy" "github.com/containers/podman/v4/pkg/util" "github.com/containers/storage" - "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/chrootarchive" "github.com/containers/storage/pkg/idmap" "github.com/containers/storage/pkg/idtools" "github.com/containers/storage/pkg/lockfile" @@ -761,7 +761,7 @@ func (c *Container) export(out io.Writer) error { }() } - input, err := archive.Tar(mountPoint, archive.Uncompressed) + input, err := chrootarchive.Tar(mountPoint, nil, mountPoint) if err != nil { return fmt.Errorf("reading container directory %q: %w", c.ID(), err) }
utils/utils.go+24 −1 modified@@ -13,6 +13,7 @@ import ( "github.com/containers/common/pkg/cgroups" "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/chrootarchive" "github.com/godbus/dbus/v5" "github.com/sirupsen/logrus" ) @@ -63,7 +64,7 @@ func CreateTarFromSrc(source string, dest string) error { return fmt.Errorf("could not create tarball file '%s': %w", dest, err) } defer file.Close() - return TarToFilesystem(source, file) + return TarChrootToFilesystem(source, file) } // TarToFilesystem creates a tarball from source and writes to an os.file @@ -87,6 +88,28 @@ func Tar(source string) (io.ReadCloser, error) { return archive.Tar(source, archive.Uncompressed) } +// TarChrootToFilesystem creates a tarball from source and writes to an os.file +// provided while chrooted to the source. +func TarChrootToFilesystem(source string, tarball *os.File) error { + tb, err := TarWithChroot(source) + if err != nil { + return err + } + _, err = io.Copy(tarball, tb) + if err != nil { + return err + } + logrus.Debugf("wrote tarball file %s", tarball.Name()) + return nil +} + +// TarWithChroot creates a tarball from source and returns a readcloser of it +// while chrooted to the source. +func TarWithChroot(source string) (io.ReadCloser, error) { + logrus.Debugf("creating tarball of %s", source) + return chrootarchive.Tar(source, nil, source) +} + // RemoveScientificNotationFromFloat returns a float without any // scientific notation if the number has any. // golang does not handle conversion of float64s that have scientific
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- github.com/advisories/GHSA-qwqv-rqgf-8qh8ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2023-0778ghsaADVISORY
- access.redhat.com/security/cve/CVE-2023-0778ghsaWEB
- bugzilla.redhat.com/show_bug.cgighsaWEB
- github.com/containers/podman/commit/6ca857feb07a5fdc96fd947afef03916291673d8ghsaWEB
- github.com/containers/podman/pull/17528ghsaWEB
- github.com/containers/podman/pull/17532ghsaWEB
- pkg.go.dev/vuln/GO-2023-1681ghsaWEB
News mentions
0No linked articles in our index yet.