How to fix CVE-2024-21626 – Step-by-Step Guide
CVE-2024-21626, dubbed "Leaky Vessels," is a high-severity runc container escape vulnerability (CVSS 8.6). Published on January 31, 2024, it allows attackers to break out of container isolation. This critical flaw impacts Docker, Kubernetes, and other runc-based container environments.
What is runc Container Escape – Leaky Vessels?
CVE-2024-21626 is a file descriptor leak in runc, specifically affecting versions prior to 1.1.12. This vulnerability allows a malicious container process to exploit a leaked file descriptor. By manipulating `/proc/self/fd`, an attacker can escape the container's isolation boundary and gain root privileges on the host system.
Impact and Risks for your Infrastructure
The primary impact is a complete container escape, granting an attacker root access to the underlying host system. This can lead to full system compromise, data exfiltration, service disruption, and unauthorized resource usage across your infrastructure. Organizations running affected containerized applications face severe security risks.
Step-by-Step Mitigation Guide
To mitigate CVE-2024-21626, immediately update runc to version 1.1.12 or later. For Docker, Kubernetes, or containerd users, this typically involves updating your container runtime or host OS packages. Verify the fix by checking your runc version (e.g., `runc --version`) to confirm it's 1.1.12+.
- 1Update runc to 1.1.12 or later.
- 2Update Docker to 25.0.2+ / 24.0.9+ and containerd to 1.7.13+ / 1.6.27+.
- 3Run containers as non-root with --user and --cap-drop=ALL.
- 4Enable Seccomp and AppArmor/SELinux profiles for containers.
- 5Restrict /proc access with read-only mounts where possible.
- 6Run containers in rootless mode (Podman, rootless Docker) for defense-in-depth.