All versions of runc <=1.1.11, as used by containerization technologies such as Docker engine, and Kubernetes are vulnerable to an arbitrary file write. Due to a file descriptor leak it is possible to mount the host file system with the permissions of runc (typically root). Successfully tested on Ubuntu 22.04 with runc 1.1.7-0ubuntu1~22.04.1 and runc 1.1.11 using Docker build. Successfully tested on Debian 12.4.0 with runc 1.1.11 using Docker build. Successfully tested on Arch Linux 12/1/2024 with runc 1.1.10-1 using Docker build.
Vulnerability
CVE-2024-21626
runc container breakout through process.cwd trickery and leaked fds
Vulnerability details
- Score
- 8.6
- Severity
- high
CVSS 3.1 · GitHub_M
Vector string
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HDescription
runc is a CLI tool for spawning and running containers on Linux according to the OCI specification. In runc 1.1.11 and earlier, due to an internal file descriptor leak, an attacker could cause a newly-spawned container process (from runc exec) to have a working directory in the host filesystem namespace, allowing for a container escape by giving access to the host filesystem ("attack 2"). The same attack could be used by a malicious image to allow a container process to gain access to the host filesystem through runc run ("attack 1"). Variants of attacks 1 and 2 could be also be used to overwrite semi-arbitrary host binaries, allowing for complete container escapes ("attack 3a" and "attack 3b"). runc 1.1.12 includes patches for this issue.
CVE ProgramExploit source choices
15 sources使用 Github Actions 跟踪 Github 趋势项目。
A penetration toolkit for container environment
记录自己在云安全上的学习笔记等。
v0wkeep3r/cve-2024-21626-runcpoc source repository
github runner
Container Runtime Meetup #5 のLT用のデモ
dorser/cve-2024-21626 source repository
Controlled reproduction environment for CVE-2024-21626 (runc container escape). Demonstrates container isolation failure, host reconnaissance, and controlled host executable replacement in an isolated Docker lab.
POCs and Tetragon Rules for CVE-2024-21626 and CVE-2025-31133
sk3pper/cve-2024-21626 source repository
alban/runc-vuln-detector source repository
zpxlz/cve-2024-21626-poc source repository
A powerful Kubernetes debugging tool that enables network capture, command execution, and file operations across multiple pods and nodes simultaneously through privileged debug pods.
Some scripts to simulate an attack (used for CVE-2024-21626)