CVE-2019-18466
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Podman v1.5.x and earlier resolves symlinks in the host context during container-to-host copy due to an undesired glob operation, allowing file overwrite.
Root
Cause
CVE-2019-18466 is a vulnerability in Podman (libpod) versions before 1.6.0. The issue occurs during a copy operation from a container to the host filesystem: an undesired glob operation causes symlinks to be resolved in the *host* context rather than the container context [1][3]. This means that when a user copies files from a container image, any symbolic links within the container that point to absolute paths on the host will be followed and copied as the resolved host path.
Exploitation
An attacker can craft a malicious container image containing symlinks that reference sensitive or security-critical files on the host (e.g., /etc/passwd, /usr/bin/sudo, or any other file). When a victim user—who may be unprivileged—copies such files from the container to host storage (a common operation during image extraction, debugging, or data transfer), the copy operation will overwrite the host file with the content from the container (or, if the container symlink points to another host file, could overwrite that host file) [1]. The attack requires the victim to perform a podman cp (or equivalent) on an image or container that the attacker controls. No special privileges beyond the ability to run Podman and perform copy operations are needed.
Impact
If successfully exploited, an attacker can overwrite arbitrary host files to which the Podman process (or the user performing the copy) has write access. This can lead to privilege escalation (e.g., overwriting a setuid binary or a system configuration file), data corruption, or denial of service (by overwriting critical system files) [1][3]. The severity is rated with a CVSS score of 7.5 (High) [3].
Mitigation
The vulnerability is fixed in Podman (libpod) version 1.6.0 [1][3][4]. Users should upgrade to Podman 1.6.0 or later. Red Hat Enterprise Linux 8 users can obtain the fix through RHSA-2019:4269, which updates the podman package to version 1.4.2-6.module+el8.1.0+4830... (part of a module stream) [1]. No workarounds other than upgrading are documented; users must avoid copying files from untrusted container images on unpatched systems.
AI Insight generated on May 21, 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 | < 1.6.0 | 1.6.0 |
Affected products
14- Podman/libpoddescription
- ghsa-coords13 versionspkg:golang/github.com/containers/podman/v4pkg:rpm/opensuse/cni&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/cni-plugins&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/conmon&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/fuse-overlayfs&distro=openSUSE%20Leap%2015.1pkg:rpm/opensuse/podman&distro=openSUSE%20Leap%2015.1pkg:rpm/suse/cni&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Containers%2015%20SP1pkg:rpm/suse/cni&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP1pkg:rpm/suse/cni-plugins&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Containers%2015%20SP1pkg:rpm/suse/cni-plugins&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP1pkg:rpm/suse/conmon&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Containers%2015%20SP1pkg:rpm/suse/fuse-overlayfs&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Containers%2015%20SP1pkg:rpm/suse/podman&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Containers%2015%20SP1
< 1.6.0+ 12 more
- (no CPE)range: < 1.6.0
- (no CPE)range: < 0.7.1-lp151.2.3.1
- (no CPE)range: < 0.8.4-lp151.2.3.1
- (no CPE)range: < 2.0.10-lp151.2.1
- (no CPE)range: < 0.7.6-lp151.5.1
- (no CPE)range: < 1.8.0-lp151.3.9.1
- (no CPE)range: < 0.7.1-3.3.1
- (no CPE)range: < 0.7.1-3.3.1
- (no CPE)range: < 0.8.4-3.3.1
- (no CPE)range: < 0.8.4-3.3.1
- (no CPE)range: < 2.0.10-3.3.1
- (no CPE)range: < 0.7.6-3.6.1
- (no CPE)range: < 1.8.0-4.14.1
Patches
15c09c4d2947aMerge pull request #3942 from jwhonce/issue/3829
3 files changed · +14 −34
cmd/podman/cp.go+6 −21 modified@@ -52,7 +52,7 @@ func init() { cpCommand.Command = _cpCommand flags := cpCommand.Flags() flags.BoolVar(&cpCommand.Extract, "extract", false, "Extract the tar file into the destination directory.") - flags.BoolVar(&cpCommand.Pause, "pause", false, "Pause the container while copying") + flags.BoolVar(&cpCommand.Pause, "pause", true, "Pause the container while copying") cpCommand.SetHelpTemplate(HelpTemplate()) cpCommand.SetUsageTemplate(UsageTemplate()) } @@ -147,7 +147,6 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin hostOwner := idtools.IDPair{UID: int(hostUID), GID: int(hostGID)} - var glob []string if isFromHostToCtr { if isVol, volDestName, volName := isVolumeDestName(destPath, ctr); isVol { path, err := pathWithVolumeMount(ctr, runtime, volDestName, volName, destPath) @@ -209,13 +208,7 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin srcPath = cleanedPath } } - glob, err = filepath.Glob(srcPath) - if err != nil { - return errors.Wrapf(err, "invalid glob %q", srcPath) - } - if len(glob) == 0 { - glob = append(glob, srcPath) - } + if !filepath.IsAbs(destPath) { dir, err := os.Getwd() if err != nil { @@ -224,19 +217,11 @@ func copyBetweenHostAndContainer(runtime *libpod.Runtime, src string, dest strin destPath = filepath.Join(dir, destPath) } - var lastError error - for _, src := range glob { - if src == "-" { - src = os.Stdin.Name() - extract = true - } - err := copy(src, destPath, dest, idMappingOpts, &destOwner, extract, isFromHostToCtr) - if lastError != nil { - logrus.Error(lastError) - } - lastError = err + if src == "-" { + srcPath = os.Stdin.Name() + extract = true } - return lastError + return copy(srcPath, destPath, dest, idMappingOpts, &destOwner, extract, isFromHostToCtr) } func getUser(mountPoint string, userspec string) (specs.User, error) {
test/e2e/cp_test.go+2 −2 modified@@ -223,7 +223,7 @@ var _ = Describe("Podman cp", func() { session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) - session = podmanTest.Podman([]string{"cp", "testctr:testfile", "testfile1"}) + session = podmanTest.Podman([]string{"cp", "--pause=false", "testctr:testfile", "testfile1"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0)) @@ -233,7 +233,7 @@ var _ = Describe("Podman cp", func() { Expect(err).To(BeNil()) Expect(strings.Contains(string(cmdRet), "testuser")).To(BeFalse()) - session = podmanTest.Podman([]string{"cp", "testfile1", "testctr:testfile2"}) + session = podmanTest.Podman([]string{"cp", "--pause=false", "testfile1", "testctr:testfile2"}) session.WaitWithDefaultTimeout() Expect(session.ExitCode()).To(Equal(0))
test/system/065-cp.bats+6 −11 modified@@ -27,13 +27,8 @@ load helpers "echo $rand_content1 >/tmp/$rand_filename1; echo $rand_content2 >/tmp/$rand_filename2" - run_podman cp 'cpcontainer:/tmp/*' $dstdir - - test -e $dstdir/$rand_filename1 || die "file 1 not copied from container" - test -e $dstdir/$rand_filename2 || die "file 2 not copied from container" - - is "$(<$dstdir/$rand_filename1)" "$rand_content1" "content of file 1" - is "$(<$dstdir/$rand_filename2)" "$rand_content2" "content of file 2" + # cp no longer supports wildcarding + run_podman 125 cp 'cpcontainer:/tmp/*' $dstdir run_podman rm cpcontainer } @@ -150,13 +145,13 @@ load helpers # Copy file from host into container, into a file named 'x' # Note that the second has a trailing slash; this will trigger mkdir - run_podman cp $srcdir/$rand_filename1 cpcontainer:/tmp/d1/x + run_podman cp --pause=false $srcdir/$rand_filename1 cpcontainer:/tmp/d1/x is "$output" "" "output from podman cp 1" - run_podman cp $srcdir/$rand_filename2 cpcontainer:/tmp/d2/x/ + run_podman cp --pause=false $srcdir/$rand_filename2 cpcontainer:/tmp/d2/x/ is "$output" "" "output from podman cp 3" - run_podman cp $srcdir/$rand_filename3 cpcontainer:/tmp/d3/x + run_podman cp --pause=false $srcdir/$rand_filename3 cpcontainer:/tmp/d3/x is "$output" "" "output from podman cp 3" # Read back. @@ -205,7 +200,7 @@ load helpers "mkdir -p $graphroot; trap 'exit 0' 15;while :;do sleep 0.5;done" # Copy from host into container. - run_podman cp $srcdir/$rand_filename cpcontainer:$graphroot/$rand_filename + run_podman cp --pause=false $srcdir/$rand_filename cpcontainer:$graphroot/$rand_filename # ls, and confirm it's there. run_podman exec cpcontainer ls -l $graphroot/$rand_filename
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
8- lists.opensuse.org/opensuse-security-announce/2020-03/msg00040.htmlmitrevendor-advisoryx_refsource_SUSE
- access.redhat.com/errata/RHSA-2019:4269ghsavendor-advisoryx_refsource_REDHATWEB
- github.com/advisories/GHSA-r34v-gqmw-qvgjghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-18466ghsaADVISORY
- bugzilla.redhat.com/show_bug.cgighsax_refsource_MISCWEB
- github.com/containers/libpod/commit/5c09c4d2947a759724f9d5aef6bac04317e03f7eghsax_refsource_MISCWEB
- github.com/containers/libpod/compare/v1.5.1...v1.6.0ghsax_refsource_MISCWEB
- github.com/containers/libpod/issues/3829ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.