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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
- RHSA-2019:1852 Red Hat Security Advisory: OpenShift Container Platform 3.9 atomic-openshift security update Red Hat Security Advisories (RHSA) · Jan 14, 2026
- RHSA-2019:1632 Red Hat Security Advisory: Red Hat OpenShift Container Platform 3.10 atomic-openshift security update Red Hat Security Advisories (RHSA) · Jan 14, 2026
- RHSA-2019:1633 Red Hat Security Advisory: Red Hat OpenShift Container Platform 3.11 atomic-openshift security update Red Hat Security Advisories (RHSA) · Jan 14, 2026
- ELSA-2019-4816 Important: kubernetes security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Jan 31, 2020