CVE Vulnerabilities

CVE-2019-11246

UNIX Symbolic Link (Symlink) Following

Published: Aug 29, 2019 | Modified: Nov 21, 2024
CVSS 3.x
6.5
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
CVSS 2.x
4.3 MEDIUM
AV:N/AC:M/Au:N/C:N/I:P/A:N
RedHat/V2
RedHat/V3
5.3 MODERATE
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
Ubuntu
MEDIUM

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.

Weakness

The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.

Affected Software

Name Vendor Start Version End Version
Kubernetes Kubernetes 1.0.0 (including) 1.12.10 (including)
Kubernetes Kubernetes 1.13.0 (including) 1.13.9 (excluding)
Kubernetes Kubernetes 1.14.0 (including) 1.14.5 (excluding)
Kubernetes Kubernetes 1.15.0 (including) 1.15.2 (excluding)
Kubernetes Kubernetes 1.12.11-beta0 (including) 1.12.11-beta0 (including)
Red Hat OpenShift Container Platform 3.10 RedHat atomic-openshift-0:3.10.149-1.git.0.05de590.el7 *
Red Hat OpenShift Container Platform 3.11 RedHat atomic-openshift-0:3.11.117-1.git.0.14e54a3.el7 *
Red Hat OpenShift Container Platform 3.9 RedHat atomic-openshift-0:3.9.89-1.git.0.9454f2a.el7 *
Kubernetes Ubuntu cosmic *
Kubernetes Ubuntu disco *
Kubernetes Ubuntu eoan *
Kubernetes Ubuntu groovy *
Kubernetes Ubuntu hirsute *
Kubernetes Ubuntu impish *
Kubernetes Ubuntu kinetic *
Kubernetes Ubuntu lunar *
Kubernetes Ubuntu mantic *
Kubernetes Ubuntu trusty *

Potential Mitigations

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

References