CVE-2019-11249 kubectl cp allows symlink directory traversal
A malicious tar binary in a container can exploit kubectl cp to write files to arbitrary paths on the user's local machine, potentially executing code.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2019-11249?
CVE-2019-11249 is a medium-severity path traversal vulnerability in Kubernetes Kubernetes, published on 29 Aug 2019. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official 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.13.9, versions prior to 1.14.5, versions prior to 1.15.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, 1.12.
Which versions are affected by CVE-2019-11249?
It affects 2 products.
Linux distribution packages (12)
atomic-enterprise-service-catalog Red Hat:openshift:4.1::el7 | All versions | 1:4.1.16-201909090609.git.1.cc4acc1.el7 |
atomic-enterprise-service-catalog-svcat Red Hat:openshift:4.1::el7 | All versions | 1:4.1.16-201909090609.git.1.cc4acc1.el7 |
jenkins-2-plugins Red Hat:openshift:4.1::el7 | All versions | 0:4.1.1567784275-1.el7 |
openshift Red Hat:openshift:4.1::el7 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el7 |
openshift-ansible Red Hat:openshift:4.1::el7 | All versions | 0:4.1.16-201909090609.git.162.a0800db.el7 |
openshift-clients Red Hat:openshift:4.1::el7 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el7 |
openshift-clients-redistributable Red Hat:openshift:4.1::el7 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el7 |
openshift-hyperkube Red Hat:openshift:4.1::el7 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el7 |
openshift Red Hat:openshift:4.1::el8 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el8 |
openshift-clients Red Hat:openshift:4.1::el8 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el8 |
openshift-clients-redistributable Red Hat:openshift:4.1::el8 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el8 |
openshift-hyperkube Red Hat:openshift:4.1::el8 | All versions | 0:4.1.16-201909090609.git.0.2f97059.el8 |
Products include Kubernetes Kubernetes, Redhat Openshift Container Platform.
How do I fix CVE-2019-11249?
Upgrade to a fixed version.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2019-11249 being exploited?
There is no known exploitation of CVE-2019-11249 in the wild and no public exploit code.
Other vulnerabilities in Kubernetes Kubernetes
- CVE-2018-1002105 Privilege Escalation in Kubernetes
- CVE-2017-1000056 Kubernetes Privilege Escalation
- CVE-2016-1906 Authorization bypass in Openshift
- CVE-2023-3676 Kubernetes - Windows nodes - Insufficient input sanitization leads to privilege escalation
- CVE-2023-3955 Kubernetes - Windows nodes - Insufficient input sanitization leads to privilege escalation
Sources
Also known as GHSA-v8c4-hw4j-x4pr, RHBA-2019:2794.