Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2024-21626: Leaky Vessels: runc File-Descriptor Leak Container Escape

Published Jan 31, 2024 · Updated 5 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days5 mentions · peak 3 in a dayToday
CVSS8.6High · v3.1
EPSS18.9%97th percentile
CISA KEVNoNot listed
In the wildReported1 exploitation record in Mallory
Vendors
Fedora ProjectLinux Foundation
IdentifiersCVE-2024-21626CWE-403 · Exposure of File Descriptor to…

CVE-2024-21626 is a container-escape vulnerability in runc 1.1.11 and earlier caused by leaked internal file descriptors and insufficient working-directory validation. A specially configured container process launched through runc run or runc exec can retain a working directory in the host filesystem namespace, providing access outside the container filesystem. Malicious container images can trigger the runc run attack path, while an attacker controlling an existing container can prepare conditions for exploitation during a subsequent runc exec operation. Additional variants permit overwriting semi-arbitrary host binaries and can lead to complete container escape. The vulnerability also affects higher-level container platforms that use vulnerable runc versions. Upstream runc 1.1.12 fixes the issue.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Exploitation breaches container filesystem isolation, exposing host data and potentially allowing modification of host files. Host-binary overwrite variants can lead to host code execution and complete container escape. A compromised container host or Kubernetes node can expose credentials, other workloads, and shared infrastructure, enabling lateral movement and service disruption. In Docker Desktop on macOS, the immediate escape target is the LinuxKit virtual machine rather than the macOS host directly.

Mitigation

If you can’t patch tonight, do this now.

Until patched, run only trusted images, restrict container process.cwd settings to the container root directory, and avoid runc exec operations, including those invoked indirectly by higher-level runtimes. Working-directory restrictions do not address every variant: attack 3b has no practical workaround other than avoiding runc exec. Review untrusted images, Dockerfiles, and workload configurations for attempted exploitation. These controls are temporary exposure reductions, not substitutes for updating runc.

Remediation

Patch, then assume compromise.

Upgrade upstream runc to 1.1.12 or later, or install a distribution-supported package containing the backported fix; an older upstream version number alone does not establish that a vendor package remains vulnerable. The patches validate that the working directory is inside the container, close internal file descriptors before execution, fix descriptor leaks, and enforce close-on-exec handling. Update bundled container-platform components through vendor-supported releases; identified fixed releases include Docker Engine/Moby 25.0.2, Docker Desktop 4.27.1, and Talos Linux 1.5.6 or 1.6.4 in their respective release lines. Replace or restart managed-service resources where required to activate the patched runtime.

Public exploits

Exploits

9 exploits validated by Mallory's analysis. Hidden: 6 rejected by Mallory's analysis as not a working exploit.

View more in app →
runc_cwd_priv_esc.rbThis repository contains a single Metasploit module (runc_cwd_priv_esc.rb) that exploits CVE-2024-21626, a file descriptor leak in runc (used by Docker and Kubernetes) on Linux. The exploit allows an attacker with an existing session on a vulnerable host to escalate privileges to root by abusing Docker to set the SUID bit on a payload executable. The module checks for the presence and version of runc and Docker, uploads a payload and Dockerfile to a writable directory (default: /tmp), builds a Docker image to manipulate file permissions via the vulnerable file descriptor, and executes the payload as root. The default payload is a meterpreter reverse shell, but any compatible Metasploit payload can be used. The exploit is weaponized, part of the Metasploit framework, and targets Linux systems running runc <=1.1.11. No network endpoints are hardcoded; the attack is local and requires the ability to execute commands on the target.Disclosed Jan 31, 2024 · Framework: metasploit · ruby · localWeaponizedCVE-2024-21626-POCThis repository is a proof-of-concept (POC) exploit for CVE-2024-21626, a container escape vulnerability in opencontainers runc on Linux (kernel >= 5.6). The repository contains four files: a Dockerfile for building a vulnerable container environment, a README.md with usage instructions and prerequisites, poc.sh (the main exploit script), and verify.sh (a helper script to check for vulnerable file descriptors). The exploit works by creating a malicious bash script in the host's /bin directory that, when executed, initiates a reverse shell to the attacker's machine. The exploit leverages the ability to set the container's working directory to a file descriptor that allows access to the host filesystem, thus enabling container escape. The payload is a bash reverse shell, and the exploit listens on TCP port 1337 for incoming connections. The repository is operational and demonstrates a working container escape with a reverse shell payload.Wall1e · Disclosed Feb 2, 2024 · bash · dockerfile · container escapeOperationalCVE-2024-21626-runcPOCThis repository provides proof-of-concept (POC) exploit scripts for CVE-2024-21626, a container escape vulnerability in runc (opencontainers) affecting versions v1.0.0-rc93 through 1.1.11. The exploit leverages leaked file descriptors when a container is started with a malicious image and attacker-controlled WORKDIR, allowing the attacker to access and overwrite files on the host system from within the container. The repository contains three main Bash scripts: - poc.sh: Overwrites the host's root crontab to schedule a reverse shell, then listens for a connection, achieving persistence and remote code execution on the host. - poc2.sh: Creates a malicious bash binary on the host that, when executed, provides a reverse shell to the attacker. - verify.sh: Scans for a valid leaked file descriptor by attempting to read the host's /etc/passwd file from various /proc/self/fd/* paths, confirming the vulnerability. A Dockerfile is provided to build a test environment, setting the WORKDIR to a specific file descriptor. The README.md explains the vulnerability, exploitation steps, and mitigation (upgrading runc to 1.12+). The exploit requires the victim to run a container from a malicious image and for the attacker to execute commands inside the container. If successful, the attacker can escape the container and execute arbitrary commands on the host, typically resulting in a reverse shell.V0WKeep3r · Disclosed Feb 5, 2024 · bash · dockerfile · containerOperationalcontainer-escape-ebpfRepository purpose: a reproducible lab + PoCs demonstrating two runc container-escape vulnerabilities (CVE-2024-21626 and CVE-2025-31133) and optional eBPF-based enforcement/detection using Cilium Tetragon. Key exploit capabilities: - CVE-2024-21626 PoC (files/pocs/cve-2024-21626.py): builds a minimal OCI bundle and runs runc with process.cwd set to /proc/self/fd/7 (commented as a symlink to /sys/fs/cgroup). The container process runs /bin/touch with a relative path (../../../pwned_by_cve_2024_21626) to create a marker file on the host, demonstrating escape/write outside the container rootfs. - CVE-2025-31133 PoC (files/pocs/cve-2025-31133.py): builds a minimal OCI bundle and launches a container, then runs a tight race that repeatedly replaces bundle/rootfs/dev/null with either a real /dev/null copy or a symlink to /proc/sys/kernel/core_pattern. It then uses runc exec to write a pipe handler ("|/bin/touch /pwned_by_cve_2025_31133") into core_pattern and verifies it by reading the sysctl. On success it triggers SIGSEGV inside the container to cause the kernel to execute the core_pattern handler as root, creating the marker file. Defensive/detection content: - files/rules/cve-2024-21626.yaml: Tetragon TracingPolicy kprobe on sys_chdir; matches /proc/*/fd/{6,7,8} when binary ends with /runc; posts an event and overrides with -EPERM to block. - files/rules/cve-2025-31133.yaml: Tetragon TracingPolicy kprobe on sys_openat; blocks writes (O_WRONLY/O_RDWR) to /proc/sys/kernel/core_pattern from non-host mount namespaces. Lab/provisioning structure: - terraform/*: provisions an AWS EC2 instance, installs a chosen runc version (locals.tf pins 1.1.11 by default), installs Tetragon, copies PoCs and utilities to /pocs and /utils, deploys tracing policies to /etc/tetragon/tetragon.tp.d, and sets the setuid bit on /usr/local/bin/runc (increasing realism for local-priv scenarios). - Makefile: wraps terraform init/apply/destroy and provides an ssh convenience target. - files/utils/reset.sh: cleans marker files and resets kernel.core_pattern. - files/utils/performance.py + data/*.csv: local-only CPU/load measurement tooling and sample outputs; not used by the exploit itself. Overall: This is an operational PoC repo (not a framework module) focused on local container escape primitives against vulnerable runc, with clear host-side proof artifacts and optional eBPF policy enforcement to demonstrate mitigation.scherepiuk · Disclosed Dec 31, 2025 · python · bash · local (container escape via runc/OCI bundle execution) · local race condition / symlink attack against /proc/sys/kernel/core_pattern via runc container executionOperationalcve-2024-21626-runc-labThis 37-file repository is a deliberate, safety-bounded lab implementation of CVE-2024-21626 rather than a general-purpose exploit framework. It contains Bash, Python, and C tooling plus host systemd service/timer definitions. The container/ directory implements the attacker-side Attack 2 and Attack 3b variants from the runc advisory. Attack 2 rotates candidate leaked descriptor numbers, changes a controlled docker-exec working directory to /proc/self/fd/N, detects a scheduled process whose cwd accesses the host canary, then retains the escaped host-root descriptor and launches an interactive reconnaissance shell. Attack 3b replaces three controlled container command files with shebang triggers referencing candidate descriptors, identifies a process whose /proc/<pid>/exe resolves to the fixed host-demo target, holds it via O_PATH, waits for ETXTBSY to clear, and writes a validated reverse-shell payload to that target. Strong lab-specific safeguards constrain the overwrite helper to /opt/cve-2024-21626-lab/host-demo, validate target ownership, executable state, inode identity, and embedded markers, and maintain/restores backups of modified victim assets. The host/ directory builds the root-owned sacrificial executable and canary, installs and operates five recurring systemd timers, and resets the lab by stopping services and restoring clean binaries and container commands. kali/upload-lab.sh transfers and builds attacker assets through the container SSH service, while setup/setup_attack_container_ubuntu23.sh creates the non-privileged, no-host-mount lab container. The only outbound network behavior in exploit payload code is the configurable TCP reverse shell; no hard-coded external IP address, domain, or URL is present.RnW29 · Disclosed Sep 29, 2026 · bash · sh · container · local · networkOperationalcontainer-security-lab-cve-2024-21626This 19-file repository is a reproducible local container-security laboratory for CVE-2024-21626 in OpenContainers runc. It is not a remote exploit and contains no external command-and-control or network payload. The exploit mechanism is in `payload/Dockerfile`, which sets the image working directory to `/proc/self/fd/8`. Under runc v1.1.11, this can cause the container process to start from a location outside the intended container root filesystem. `vulnerable-runtime/Dockerfile` clones and builds runc v1.1.11. `scripts/setup.sh` extracts that binary, creates a host marker, launches a separate Docker daemon on `/run/docker-cve-lab.sock`, and registers the extracted binary as the `vulnerable` runtime through `vulnerable-runtime/daemon.json`. `scripts/demonstrate.sh` starts the payload using that runtime, displays the effective working directory, and reads the hard-coded host marker path. `scripts/baseline.sh` repeats the attempt with the normal Docker runtime and treats inability to read the marker (including container startup failure) as the expected safe result. `scripts/cleanup.sh` removes lab containers and stops the separate daemon. The included evidence shows runc 1.1.11 and a successful proof with current working directory `/sys/fs/cgroup`, followed by disclosure of `evidence/host-marker/escape-proof.txt`. The proof is intentionally constrained to reading a marker, but successful exploitation demonstrates that an attacker able to control an OCI container configuration or image working directory under an affected runc runtime may access host filesystem locations reachable through the escaped working directory.MutagomaRaissa · Disclosed Oct 1, 2026 · bash · dockerfile · container · localOperationalcve-2024-21626-ctfThis six-file repository is an educational CTF reproduction of the file-descriptor leak concept associated with CVE-2024-21626, not a working escape against real runc. Its two Python files implement a Flask target and an automated solver. src/app.py stores separate container and host filesystems in dictionaries. resolve_cwd() recognizes /proc/self/fd/<number> and selects a virtual filesystem from a fixed descriptor table. Descriptor 7 points to host:/sys/fs/cgroup; descriptors 8 and 9 remain inside the virtual container. Three parent-directory traversals from descriptor 7 reach the simulated host root, where cat flag returns the flag. Only cat, ls, and pwd are interpreted; no shell or real filesystem access is used. exploit/solve.py checks the landing page, retrieves /inspect, extracts descriptor numbers, and POSTs candidate working directories to /run at traversal depths one through four. It prints the first output matching WINS{...}. This is an operational solver for the included lab, not merely a detector, but its container-escape claim applies only to the simulation. The web interface is unauthenticated, and the landing-page banner, descriptor mapping, and virtual OS files provide distinctive fingerprints. Dockerfile builds a python:3.10-slim image with Flask and curl and starts app.py. docker-compose.yml publishes 10024:5000, defines a health check and resource limits, and supplies a placeholder FLAG. README.md documents deployment and the intended solution; .gitignore excludes caches and local data. Despite documentation saying flags are never hardcoded, app.py contains a fallback flag and Compose contains WINS{placeholder}. The standalone solver imports requests, but no dependency manifest or explicit solver dependency installation is provided. No external callback or exfiltration service is present; recovered data returns through the target's HTTP response. Repository URL, Git reference, and archive byte size were not supplied; their metadata fields are left empty or set to zero.ghs053020-stack · Disclosed Nov 17, 2026 · python · web · containerOperationalMulti-Tenant-FaaS-Security-Lab-CVE-2024-21626This repository is a self-hosted multi-tenant FaaS platform with an embedded CVE-2024-21626 research lab, not a conventional exploitation-framework module. The supplied inventory contains 83 files, including 41 Python files, 24 Bash scripts, one Ruby Vagrantfile, four JavaScript files, and four HTML/CSS assets. The frontend is duplicated under frontend/ and app/static/. Several large source files are truncated in the supplied content, so analysis of their internals is incomplete. Repository URL, Git reference, archive location, and archive byte size were not provided; empty strings and zero represent unavailable repository metadata. The main exploit entry is scripts/04_validar_cve.sh, which invokes the guest-installed copy of infrastructure/lab/scripts/validar_cve_guest.sh through Vagrant SSH. The guest script verifies root privileges, the lab hostname, expected runtimes, and synthetic secret content. It first confirms that Tenant A cannot directly read Tenant B's host-side volume path. It then runs docker exec with --workdir /proc/self/fd/7 and a relative traversal to read that secret through the leaked runtime descriptor. It compares the recovered bytes with the reference marker, prints the result, creates a normal-runc control container, repeats the access attempt, and removes the control container on exit. This is active exploitation with a basic hardcoded file-read payload, although packaged as a controlled validation test. Reproduction depends on descriptor 7 and the expected Docker volume layout; no generalized descriptor discovery is implemented. CVE-2024-21626-vetores-flags.md supplies additional manual docker run and docker exec variants for reading host markers and accessing another tenant's volume. Its 'Attack 3' wording discusses binary overwrite, but the actual commands only read a marker and list /bin/bash and /usr/bin/bash. Consequently, host-binary overwrite, host command execution, reverse-shell delivery, and persistence are not demonstrated. The escaped 'host' is the Docker-host VM, not the outer KVM host; no hypervisor escape is shown. The infrastructure/lab/ directory provisions Ubuntu 24.04, Docker, the isolated runc-vuln runtime, two network-disabled tenant containers, synthetic volume data, and the guest agent. scripts/obter_runc.sh downloads official runc 1.1.11 and verifies the fixed SHA-256 77ae134de014613c44d25e6310a57a219a7a91155cd47d069a0f22a2cad5caea before executing it; this verifies consistency with the repository's expected bytes, not an independently authenticated release signature. Installation provisions the vulnerable environment but does not invoke the exploit automatically. The app/ package implements the FastAPI/SQLite control plane: tenant authentication and delegated admin context, container lifecycle management and auditing, VM management and asynchronous jobs, FaaS deployments/invocations, source recovery, and function recycling. runtime/agent.py receives JSON through authenticated SSH and manages guest Docker resources. Ordinary FaaS workloads explicitly use normal runc rather than runc-vuln. The dashboard communicates with same-origin local API routes, and the default API binds only to 127.0.0.1:8090. The scripts/ directory also contains dependency setup, startup, systemd/libvirt autostart, smoke testing, reset, and publication-secret scanning. tests/ contains 24 Python test modules, largely using mocked Docker, Vagrant, and guest interactions; their presence does not establish successful live exploitation. No command-and-control or external exfiltration endpoint is evident in the supplied code. The principal external code download is the official GitHub runc release URL. Recursive deletion appears in scoped lab-reset and managed-resource cleanup code and is not evidence that the exploit is fake. Analysis was static; no scripts, tests, downloads, or payloads were executed.n3d-d3v · Disclosed Nov 18, 2026 · python · bash · container · localOperationalCVE-2024-21626-PoCThis repository provides a proof-of-concept (PoC) exploit for CVE-2024-21626, a container escape vulnerability in runc versions 1.1.11 and below. The exploit leverages a file descriptor leak of /sys/fs/cgroup into the container's init process, allowing the container's working directory (cwd) to be set to a host file descriptor (e.g., /proc/self/fd/7). This enables processes inside the container to access the host filesystem, effectively escaping the container. The repository contains four files: a Makefile for automation, a README.md with detailed vulnerability and exploitation steps, and two bash scripts (poc-autoplay.sh and poc-uninstall.sh). The main exploit logic is in poc-autoplay.sh, which automates the setup of a vulnerable runc environment, ensures the correct Docker and Go versions, builds and installs a vulnerable runc, prepares an Alpine rootfs, patches the container's config.json to set cwd to /proc/self/fd/7, and provides instructions to run the exploit. The uninstall script restores the original runc binary and cleans up the environment. The exploit is local in nature, requiring the ability to run containers and modify binaries on the target system. No remote endpoints are involved, but several fingerprintable file paths are used, such as /proc/self/fd/7 and /usr/bin/runc. The PoC demonstrates the vulnerability and provides a clean-up script for safe testing.R4mbb · Disclosed Aug 2, 2025 · bash · makefile · localPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Fedora ProjectFedoraoperating_system
Linux FoundationRuncapplication
FAQ

Frequently asked questions

Is CVE-2024-21626 exploited in the wild?
Yes. As of Nov 15, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2024-21626?
Yes. Mallory tracks 9 public exploits or proofs of concept for CVE-2024-21626, the earliest disclosed Jan 31, 2024.
Is there a patch for CVE-2024-21626?
Upgrade upstream runc to 1.1.12 or later, or install a distribution-supported package containing the backported fix; an older upstream version number alone does not establish that a vendor package remains vulnerable. The patches validate that the working directory is inside the container, close internal file descriptors before execution, fix descriptor leaks, and enforce close-on-exec handling.
What products are affected by CVE-2024-21626?
Linux Foundation Runc and Fedora Project Fedora.
How severe is CVE-2024-21626?
CVE-2024-21626 has a CVSS v3.1 score of 8.6 (High) and an EPSS score of 18.9% (97th percentile) as of Nov 15, 2026.
Activity feed

Recent activity

40 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
tenable nessus pluginsNews · Nov 15, 2026Rocky Linux 9.2 [CIQ] Security Update: runc Multiple Vulnerabi... | Tenable®Included in the runc security update for Rocky Linux 9.2 under CIQ advisory ciqsa-2026_1820. It supplies the plugin's high-severity CVSS v3 base score of 8.6. The listed vector indicates local access, no required privileges, user interaction, changed scope, and high confidentiality, integrity, and availability impacts. The plugin reports exploit availability collectively, without identifying which individual CVEs have exploits.Read more ↗malware newsNews · Nov 6, 2026Virtualization security: attack layers and misconfiguration impact - Malware News - Malware Analysis, News and IndicatorsA runc vulnerability involving leaked file descriptors that can expose the host filesystem to a malicious container image or container process. Included as background on container isolation failures.Read more ↗securelist ruNews · Nov 6, 2026Как ошибки в конфигурации виртуальных сред могут обернуться компрометацией | SecurelistA file-descriptor leak vulnerability in runc that could allow a malicious container image or container process to access the host filesystem. Included as a background example of container-isolation failures.Read more ↗securelistNews · Nov 6, 2026How misconfigurations in virtual environments can lead to compromise | SecurelistA runc vulnerability involving leaked file descriptors that could allow a malicious container image or container process to access the host filesystem.Read more ↗
+24 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity8Community discussion across Reddit, Mastodon, and other social sources.