Container's UID could clash with host's UID Affecting Container service in Kubernetes


Severity

0.0
medium
0
10
    Severity Framework
    Snyk CCSS
    Rule category
    Containers / Best Practices

Is your enviroment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
    Frameworks
    CIS-Controls
  • Snyk ID SNYK-CC-00615
  • credit Snyk Research Team

Description

UID of the container processes could clash with host's UIDs and lead to unintentional authorization bypass.

How to fix?

Set securityContext.runAsUser value to greater or equal than 10'000. SecurityContext can be set on both pod and container level. If both are set, then the container level takes precedence.

Terraform