Skip to main content

CVE-2024-21626: CWE-403: Exposure of File Descriptor to Unintended Control Sphere ('File Descriptor Leak') in opencontainers runc

High
VulnerabilityCVE-2024-21626cvecve-2024-21626cwe-403cwe-668
Published: Wed Jan 31 2024 (01/31/2024, 21:31:14 UTC)
Source: CVE
Vendor/Project: opencontainers
Product: runc

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.

AI-Powered Analysis

AILast updated: 07/04/2025, 19:40:54 UTC

Technical Analysis

CVE-2024-21626 is a high-severity vulnerability affecting the opencontainers runc tool, versions from 1.0.0-rc93 up to but not including 1.1.12. runc is a widely used CLI tool for spawning and running Linux containers according to the Open Container Initiative (OCI) specification. The vulnerability arises from an internal file descriptor leak that allows unintended exposure of file descriptors to container processes. Specifically, an attacker can exploit this flaw to cause a newly spawned container process—either via 'runc exec' or 'runc run'—to have its working directory mapped within the host filesystem namespace. This misconfiguration enables a container escape, granting the container process unauthorized access to the host filesystem. The vulnerability manifests in three main attack variants: (1) a malicious container image can exploit the leak during 'runc run' to gain host filesystem access; (2) an attacker using 'runc exec' can spawn a container process with host filesystem visibility; and (3) variants of these attacks can overwrite semi-arbitrary host binaries, potentially leading to full container escapes and complete host compromise. The vulnerability is classified under CWE-403 (Exposure of File Descriptor to Unintended Control Sphere) and CWE-668 (Exposure of Resource to Wrong Sphere). The CVSS v3.1 base score is 8.6, reflecting high impact on confidentiality, integrity, and availability, with a complexity of low and no privileges required but user interaction needed. The vulnerability was patched in runc version 1.1.12. No known exploits are currently reported in the wild, but the severity and nature of the flaw make it a critical risk for containerized environments that rely on vulnerable runc versions.

Potential Impact

For European organizations, this vulnerability poses a significant risk to containerized infrastructure, which is widely adopted across industries such as finance, healthcare, manufacturing, and government services. Successful exploitation could lead to container escapes, allowing attackers to access sensitive host files, modify critical binaries, or execute arbitrary code on the host system. This undermines the isolation guarantees of containerization, potentially leading to data breaches, service disruptions, and lateral movement within networks. Given the increasing reliance on container orchestration platforms like Kubernetes—which commonly use runc as the default runtime—the vulnerability could impact cloud-native applications and microservices architectures prevalent in Europe. Organizations handling regulated data (e.g., GDPR-protected personal data) face compliance risks if host systems are compromised. Additionally, critical infrastructure operators using containerized environments could experience operational disruptions or sabotage. The lack of known exploits in the wild provides a window for proactive patching, but the high CVSS score indicates that exploitation could have severe consequences.

Mitigation Recommendations

European organizations should immediately verify their use of runc versions and upgrade to version 1.1.12 or later, which contains the patch for this vulnerability. Beyond patching, organizations should implement strict container runtime security policies, including: (1) enforcing least privilege for container processes and avoiding running containers with unnecessary capabilities; (2) employing container security tools that monitor for anomalous container behavior and detect container escapes; (3) isolating critical workloads on dedicated hosts or nodes with enhanced monitoring; (4) using kernel security modules (e.g., SELinux, AppArmor) to restrict container access to host resources; (5) regularly auditing container images to prevent malicious images that could exploit this vulnerability; and (6) integrating vulnerability scanning into CI/CD pipelines to catch vulnerable runc versions before deployment. Network segmentation and host-based intrusion detection systems can help detect and contain potential breaches resulting from exploitation. Finally, organizations should maintain an incident response plan tailored to container escape scenarios.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2023-12-29T03:00:44.953Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682cd0fa1484d88663aec4de

Added to database: 5/20/2025, 6:59:06 PM

Last enriched: 7/4/2025, 7:40:54 PM

Last updated: 8/15/2025, 2:57:51 PM

Views: 22

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats