Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
A container escape is an attack in which code inside a container breaks its isolation and reaches the host, exposing every other container on that node and the node’s cloud identity.

What Is a Container Escape?
A container escape is the moment an attacker stops being confined to a container and gains execution on the host beneath it. Because containers share one kernel rather than running their own, the boundary between them is a set of kernel features—namespaces, control groups, capabilities, and seccomp filters—rather than a hardware barrier. Break those and you reach every other container on the node, the node’s credentials, and whatever the cluster will let that node do next. MITRE ATT&CK tracks the technique as Escape to Host, T1611.
Most escapes in the wild need no exploit at all, because the container was launched with the isolation already disabled. The usual culprits are a container run with --privileged, which grants nearly all capabilities and access to host devices; the Docker socket mounted into a workload, which is equivalent to handing over root on the host; a host path mount such as / or /etc; hostPID or hostNetwork enabled; and dangerous individual capabilities, particularly CAP_SYS_ADMIN. Each of these appears in legitimate tooling—monitoring agents, builders, and CI runners genuinely need some of them—which is exactly why attackers look for them first.
The container runtime itself is a boundary, and it has failed several times. CVE-2019-5736 allowed a malicious container to overwrite the host runc binary by abusing a file descriptor reference to it, giving root on the host the next time a container was started. The Leaky Vessels set disclosed on 31 January 2024, including CVE-2024-21626, exposed a file descriptor leak in runc that allowed access to the host filesystem. CVE-2022-0492 showed that a control group feature could be abused for escape where CAP_SYS_ADMIN was available.
Because the kernel is shared, a local privilege escalation vulnerability in it is effectively a container escape. CVE-2022-0185, a heap overflow in the filesystem context code, was demonstrated as an escape from an unprivileged container with user namespaces enabled. Dirty Pipe, CVE-2022-0847, allowed arbitrary overwriting of read-only files. Patching the host kernel is therefore container security work, not separate from it.
Reaching the host is rarely the objective. In a managed Kubernetes cluster, the node holds a kubelet credential and, in most cloud deployments, an instance role or managed identity. An attacker on the node can read the service account tokens of every pod scheduled there, query the cloud metadata service for credentials—see our entry on the IMDS attack—and use them to pivot into the wider cloud account. The 2018 compromise of a Kubernetes console at Tesla, which attackers used to run cryptomining and reach stored cloud credentials, followed exactly this shape.
RuntimeDefault blocks a large share of the system calls escapes depend on.Runtime detection is the backstop. Tools such as Falco, and the runtime modules of a cloud workload protection platform, flag the behaviours that precede an escape: a shell opening inside a production container, a process writing to /proc or /sys paths it has no reason to touch, a mount system call from inside a container, access to the runtime socket, and unexpected reads of the metadata endpoint. Alert on these, and make sure someone is available to act on the alert.
At Privia Security, we attempt these paths deliberately in client clusters through our cloud security services.
Treat it as root on the host, because that is effectively what it is. A privileged container holds nearly all Linux capabilities and can access host devices, which gives several straightforward paths to full host control. Some tooling genuinely requires it, so isolate those workloads on dedicated nodes with restricted access rather than allowing privileged pods anywhere in a general-purpose cluster.
Yes. A process that can talk to the Docker socket can ask the daemon to start a new privileged container with the host filesystem mounted, which is a complete escape in two commands. The same applies to the containerd socket. If a build or deployment job needs to create containers, use a rootless builder or a dedicated, isolated runner rather than passing the socket through.
They raise it substantially rather than eliminating it. gVisor intercepts system calls in a user-space kernel and Kata Containers runs each workload in a lightweight virtual machine, so a single kernel flaw no longer breaks the boundary. Both add some performance cost and compatibility constraints. For multi-tenant platforms running untrusted code, that trade is usually worth making.
Look for host-level activity that no legitimate workload produces: unexpected processes on a node, new binaries written outside container filesystems, use of the kubelet credential from an unusual source, reads of service account tokens belonging to other pods, and metadata service queries from a process that has never made one. Runtime detection tooling covers most of this if the rules are tuned and watched.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.