Skip to content
OpenAdvisories
Medium · 6.4 CVE-2019-11246 EUVD-2019-2942GHSA-8wj5-gvvw-f5fh

kubectl cp allows symlink directory traversal

Published Aug 29, 2019 · Updated Sep 16, 2024 · Assigned by kubernetes

Description

The kubectl cp command allows copying files between containers and the user machine. To copy files from a container, Kubernetes runs tar inside the container to create a tar archive, copies it over the network, and kubectl unpacks it on the user’s machine. If the tar binary in the container is malicious, it could run any code and output unexpected, malicious results. An attacker could use this to write files to any path on the user’s machine when kubectl cp is called, limited only by the system permissions of the local user. Kubernetes affected versions include versions prior to 1.12.9, versions prior to 1.13.6, versions prior to 1.14.2, and versions 1.1, 1.2, 1.4, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11.

Affected products

VendorProductAffectedFixed
Kubernetes Kubernetes prior to 1.12.9, prior to 1.13.6, prior to 1.14.2, 1.1, 1.2, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Red Hat OpenShift 3 atomic-openshift +13 3.9.89-1.git.0.9454f2a.el7 RHSA-2019:1852, RHSA-2019:1633, RHSA-2019:1632
Red Hat OpenShift 3 atomic-openshift-hyperkube +1 3.10.149-1.git.0.05de590.el7 RHSA-2019:1633, RHSA-2019:1632

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 kubeadm +2 1.12.10-1.0.10.el7 ELSA-2019-4816
Oracle Linux 7 kubeadm-ha-setup 0.0.2-1.0.68.el7 ELSA-2019-4816
Oracle Linux 7 kubeadm-upgrade 0.0.1-1.0.27.el7 ELSA-2019-4816

Advisories 4

References