How to fix CVE-2024-21626 – Step-by-Step Guide
CVE-2024-21626, dubbed "Leaky Vessels," is a high-severity container escape vulnerability in runc (CVSS 8.6). Published on January 31, 2024, it affects popular container runtimes like Docker, Kubernetes, and containerd. This critical flaw allows attackers to break out of container isolation.
What is runc Container Escape – Leaky Vessels?
This vulnerability, CVE-2024-21626, stems from a file descriptor leak in runc versions prior to 1.1.12. An attacker inside a container can exploit this leak by manipulating /proc/self/fd. This allows them to gain unauthorized access and execute commands on the host system.
Impact and Risks for your Infrastructure
Successful exploitation of CVE-2024-21626 leads to a complete container escape, granting root privileges on the host. This can result in full compromise of infrastructure, data theft, or lateral movement. It poses a severe risk to any system running affected containerized applications.
Step-by-Step Mitigation Guide
To mitigate CVE-2024-21626, update runc to version 1.1.12 or higher immediately. For Docker, Kubernetes, or containerd, ensure your runtime components are updated to versions that bundle runc 1.1.12+. Verify the fix by checking the runc version on your hosts (e.g., `runc --version`) and confirming it's 1.1.12 or newer.
- 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.