Privileged Containers
One or more containers run in privileged mode, which removes most of the isolation between the container and the node it runs on.
| Severity | High |
| CVSS 3.1 | 8.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 9.3 CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H Open in the calculator |
| CWE | CWE-250: Execution with Unnecessary Privileges |
| MITRE ATT&CK | T1611 Escape to Host |
| Category | Security Misconfiguration |
Description
One or more containers run in privileged mode, set with securityContext.privileged: true in a Kubernetes pod specification or the --privileged option of docker run. A privileged container receives every Linux capability and access to the node's devices, and runs largely outside the confinement that the container runtime normally applies, such as seccomp filtering and mandatory access control profiles. Root in a privileged container therefore has almost the same power as root on the node.
An attacker who gains code execution in such a container, for example through a vulnerability in the application it runs, can escape to the node with little effort, by mounting the node's disk, loading kernel modules or abusing kernel interfaces exposed to the container. Root on a node gives access to every other container scheduled on it, together with their secrets and service account tokens, and to the node's own cluster credentials, which may allow further movement through the cluster. The main limit on the impact is the effort needed to compromise the container first.
Privileged mode is often found on monitoring, logging, networking and storage agents that need some access to the node, and on containers that build images or run Docker inside a container. It can be identified by reviewing workload manifests and pod specifications, for example in the output of kubectl get pods -A -o yaml, by inspecting containers with docker inspect, or from inside a container, where a full effective capability set (CapEff) in /proc/self/status and the node's disks visible under /dev indicate privileged mode. Configuration scanners and Kubernetes benchmark tools report it as a failed check.
Settings that grant part of the same power, such as added capabilities like SYS_ADMIN or allowPrivilegeEscalation: true, should be reviewed at the same time.
Remediation
Remove privileged mode from every workload that does not strictly need it:
- Set
privileged: false, or remove the field, in each container'ssecurityContext, drop all capabilities and add back only those the workload is known to need. - Where an agent genuinely needs access to the node, give it the narrowest access that works, such as one capability, one device or one read-only path, instead of full privilege, and run it in a dedicated namespace that few people can deploy to.
- Set
allowPrivilegeEscalation: falseand use the runtime's default seccomp profile. - Enforce the Baseline or Restricted Pod Security Standard on namespaces through Pod Security Admission, or an equivalent policy engine, so that new privileged pods are rejected.
Where privileged mode cannot be removed at once, restrict those workloads to dedicated nodes with taints and node selectors, limit who can execute commands in them, and monitor them closely. Confirm the fix by searching all pod specifications for privileged: true and checking that only documented exceptions remain.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.