title: kubelet-started container uid changes to root after first restart or if image is already pulled to the node
description: In kubelet v1.13.6 and v1.14.2, containers for pods that do not specify an explicit runAsUser attempt to run as uid 0 (root) on container restart, or if the image was previously pulled to the node. If the pod specified mustRunAsNonRoot: true, the kubelet will refuse to start the container as root. If the pod did not specify mustRunAsNonRoot: true, the kubelet will run the container as uid 0.
problem types: CWE-703: Improper Check or Handling of Exceptional Conditions
affected:
{
product: Kubernetes
vendor: Kubernetes
versions:
status: affected, version: v1.13.6
status: affected, version: v1.14.2
}
metrics:
cvssV3_0: [
attackComplexity: HIGH
attackVector: LOCAL
availabilityImpact: LOW
baseScore: 4.9
baseSeverity: MEDIUM
confidentialityImpact: LOW
integrityImpact: LOW
privilegesRequired: NONE
scope: UNCHANGED
userInteraction: NONE
vectorString: CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
version: 3.0
]
workarounds: Specify runAsUser directives in pods to control the uid a container runs as. Specify mustRunAsNonRoot:true directives in pods to prevent starting as root (note this means the attempt to start the container will fail on affected kubelet versions).