Check: CNTR-K8-000430
Kubernetes STIG:
CNTR-K8-000430
(in versions v2 r2 through v1 r7)
Title
Kubernetes Kubectl cp command must give expected access and results. (Cat II impact)
Discussion
One of the tools heavily used to interact with containers in the Kubernetes cluster is kubectl. The command is the tool System Administrators used to create, modify, and delete resources. One of the capabilities of the tool is to copy files to and from running containers (i.e., kubectl cp). The command uses the "tar" command of the container to copy files from the container to the host executing the "kubectl cp" command. If the "tar" command on the container has been replaced by a malicious user, the command can copy files anywhere on the host machine. This flaw has been fixed in later versions of the tool. It is recommended to use kubectl versions newer than 1.12.9.
Check Content
From the Control Plane and each Worker node, check the version of kubectl by executing the command: kubectl version --client If the Control Plane or any Worker nodes are not using kubectl version 1.12.9 or newer, this is a finding.
Fix Text
Upgrade the Control Plane and Worker nodes to the latest version of kubectl.
Additional Identifiers
Rule ID: SV-242396r960792_rule
Vulnerability ID: V-242396
Group Title: SRG-APP-000033-CTR-000090
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000213 |
Enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies. |
Controls
Number | Title |
---|---|
AC-3 |
Access Enforcement |