A privileged pod is a Kubernetes pod whose security context weakens isolation, most directly with securityContext.privileged: true, but also via hostPID/hostNetwork, host-path mounts, allowPrivilegeEscalation, or added capabilities. Such a pod can usually escape to its node, and from the node reach other pods and the control plane. Because any identity that can create pods can request a privileged one, privileged pods are both a direct escape and an RBAC escalation target. Pod Security Standards exist to block them.
What a privileged pod is
A pod’s `securityContext` controls how isolated its containers are. A privileged pod is one configured to give up that isolation:
privileged: true(the privileged container settings),hostPID,hostNetwork, orhostIPC(host namespaces),- a hostPath mount of a sensitive directory,
allowPrivilegeEscalation: trueor added Linux capabilities.
Any of these moves the pod toward having host-level reach.
How it is abused
Privileged pods are abused two ways:
- Direct escape: a workload that is already privileged is compromised, and the attacker escapes to the node (mount the host disk, abuse capabilities) then harvests other pods’ tokens.
- RBAC escalation: an identity that can
create podsbut is otherwise limited requests a new privileged pod (or one mounting the node), schedules it, and uses it to break out, turning "can create pods" into "owns the node". See RBAC.
Documented techniques shown for defenders.
How to defend
- Enforce Pod Security Standards (restricted) and admission control to reject privileged pods, host namespaces, and host mounts.
- Set `allowPrivilegeEscalation: false`, drop all capabilities, run as non-root, read-only root filesystem.
- Limit who can create pods and in which namespaces via RBAC.
- Audit running pods for privileged security contexts.
- Test the cluster for the create-pod-to-node-escape path.
References
- [1]Kubernetes docs: Pod Security Standards(Kubernetes)
- [2]MITRE ATT&CK: Containers Matrix(MITRE)
- [3]NIST SP 800-190 Application Container Security Guide(NIST)