CVE-2019-1002101
JSON

6.4medium

kubectl cp path traversal

Severity
6.4medium CVSS:3.0 by dwf
Exploit likelihood
12.8% (higher than 96% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
dwf
Also known as
GHSA-34jx-wx69-9x8vGO-2022-0782

Description

The kubectl cp command allows copying files between containers and the user machine. To copy files from a container, Kubernetes creates a tar inside the container, 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. The untar function can both create and follow symbolic links. The issue is resolved in kubectl v1.11.9, v1.12.7, v1.13.5, and v1.14.0.

Affected

Product or packageVersionsReported by
Kubernetes Kubernetes1.1-1.10, from 1.11 before 1.11.9, from 1.12 before 1.12.7, from 1.13 before 1.13.5, from 1.11.0 before 1.11.9, from 1.12.0 before 1.12.7, from 1.13.0 before 1.13.5, 1.14.0CVE List, NVD
k8s.io/kubernetes (Go)before 1.11.9, from 1.12.0 before 1.12.7, from 1.13.0 before 1.13.5GitHub Advisory Database, Go Vulnerability Database
redhat openshift_container_platform3.9, 3.10, 3.11NVD

All scores

dwf6.4medium CVSS:3.0CVSS:3.0/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H
GitHub5.5medium CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD5.5medium CVSS:3.0CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD5.8medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:P/A:P

Classification

What each source says

CVE List

The kubectl cp command allows copying files between containers and the user machine. To copy files from a container, Kubernetes creates a tar inside the container, 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. The untar function can both create and follow symbolic links. The issue is resolved in kubectl v1.11.9, v1.12.7, v1.13.5, and v1.14.0.

Go Vulnerability Database

Symlink Attack in kubectl cp in k8s.io/kubernetes

NVD (es)

El comando kubectl cp permite copiar archivos entre contenedores y la máquina del usuario. Para copiar archivos de un contenedor, Kubernetes crea un alquitrán dentro del contenedor, lo copia a través de la red y kubectl lo descomprime en la máquina del usuario. Si el binario tar en el contenedor es malicioso, podría ejecutar cualquier código y generar resultados inesperados y maliciosos. Un atacante podría usar esto para escribir archivos en cualquier ruta en la máquina del usuario cuando se llama a kubectl cp, limitado solo por los permisos del sistema del usuario local. La función untar puede crear y seguir enlaces simbólicos. El problema se resuelve en kubectl v1.11.9, v1.12.7, v1.13.5 y v1.14.0.

References

https://github.com/kubernetes/kubernetes/pull/75037patch, third-party-advisory, web
http://www.securityfocus.com/bid/107652third-party-advisory, vdb-entry, web
https://access.redhat.com/errata/RHBA-2019:0620vendor-advisory, web
https://access.redhat.com/errata/RHBA-2019:0619vendor-advisory, web
https://access.redhat.com/errata/RHBA-2019:0636vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BPV2RE5RMOGUVP5WJMXKQJZUBBLAFZPZ/vendor-advisory
http://www.openwall.com/lists/oss-security/2019/06/21/1mailing-list, web
http://www.openwall.com/lists/oss-security/2019/08/05/5mailing-list, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/QZB7E3DOZ5WDG46XAIU6K32CXHXPXB2F/vendor-advisory
https://www.twistlock.com/labs-blog/disclosing-directory-traversal-vulnerability-kubernetes-copy-cve-2019-1002101/
https://nvd.nist.gov/vuln/detail/CVE-2019-1002101advisory
https://github.com/kubernetes/kubernetes/commit/47063891dd782835170f500a83f37cc98c3c1013web

Related

Sources

SourceRecordLicence
CVE ListCVE-2019-1002101 changed 2024-09-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-34jx-wx69-9x8v changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0782 changed 2026-02-04CC-BY-4.0
NVDCVE-2019-1002101 changed 2026-06-17Public domain