Exploit database

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:H

Description

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 Program

Exploit source choices

15 sources
runc (docker) File Descriptor Leak Privilege Escalation
MSF-linux--local--runc_cwd_priv_escMetasploitLinux / remotePreferred

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.

2024-01-31runc_cwd_priv_esc.rb
aneasystone/github-trending
GH-57cc0777a8d8d3714cc5a0fca8b6fd16GitHubUnofficial GitHub source

使用 Github Actions 跟踪 Github 趋势项目。

2022-08-0955 files · 213 stars
ctrsploit/ctrsploit
GH-9a0531415465a45cdfdcbe664b81ee2cGitHubUnofficial GitHub source

A penetration toolkit for container environment

2021-08-031,072 files · 163 stars
bfengj/cloud-security
GH-5f6763aa865952dec9a7290732ba70d6GitHubUnofficial GitHub source

记录自己在云安全上的学习笔记等。

2023-11-056,400 files · 139 stars
v0wkeep3r/cve-2024-21626-runcpoc
GH-3a108b572e66795722d3e402988ae700GitHubUnofficial GitHub source

v0wkeep3r/cve-2024-21626-runcpoc source repository

2024-02-0512 files · 6 stars
laysakura/cve-2024-21626-demo
GH-ad7f78911877aed35f882a05663a40c6GitHubUnofficial GitHub source

Container Runtime Meetup #5 のLT用のデモ

2024-02-024 files · 3 stars
dorser/cve-2024-21626
GH-70d39d01f747d5cf1f2af8f35739de8cGitHubUnofficial GitHub source

dorser/cve-2024-21626 source repository

2024-04-107 files · 2 stars
rnw29/cve-2024-21626-runc-lab
GH-49753b08fbcec64093787273ddec5dd7GitHubUnofficial GitHub source

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.

2026-09-2937 files · 2 stars
scherepiuk/container-escape-ebpf
GH-03334833b3a665578dc47f0ec661d067GitHubUnofficial GitHub source

POCs and Tetragon Rules for CVE-2024-21626 and CVE-2025-31133

2025-12-3127 files · 2 stars
sk3pper/cve-2024-21626
GH-f33804a94d51ad313623ae5810a0cd01GitHubUnofficial GitHub source

sk3pper/cve-2024-21626 source repository

2024-03-1522 files · 2 stars
alban/runc-vuln-detector
GH-148df88193bb719511cbddcd40877c5fGitHubUnofficial GitHub source

alban/runc-vuln-detector source repository

2024-02-0913 files · 1 stars
zpxlz/cve-2024-21626-poc
GH-53248ca914cd34151c7329ba69693cd9GitHubUnofficial GitHub source

zpxlz/cve-2024-21626-poc source repository

2024-02-013 files · 1 stars
8-cm/kube-dump
GH-e75dcf772d37f2d316b95f3b6112e562GitHubUnofficial GitHub source

A powerful Kubernetes debugging tool that enables network capture, command execution, and file operations across multiple pods and nodes simultaneously through privileged debug pods.

2025-09-1124 files · 0 stars
adaammmeeee/little-joke
GH-f6c9dc188fb2f129b1fc8eeaf257ea52GitHubUnofficial GitHub source

Some scripts to simulate an attack (used for CVE-2024-21626)

2024-11-222 files · 0 stars