Potential Local Privilege Escalation via Environment Variables Misuse
Event Information
Meaning
- This event indicates a potential security issue where an attacker may exploit environment variables to escalate their privileges within the Kubernetes cluster.
- It is crucial to investigate the source of the environment variables and ensure that sensitive information or privileged access is not being misused.
- To further investigate, you can list all pods in the cluster to identify the pod associated with the event using the following command:
kubectl get pods
.
Remediation
- Create a Kubernetes Pod Security Policy to restrict the usage of environment variables in Pods:
- Update the Pod definition to adhere to the Pod Security Policy created:
- Apply the Pod Security Policy and update the Pod: