Container Escape via FD Leak in runc 1.1.11 & Prior
CVE-2024-21626 Published on January 31, 2024
runc container breakout through process.cwd trickery and leaked fds
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.
Vulnerability Analysis
CVE-2024-21626 is exploitable with local system access, requires user interaction. This vulnerability is considered to have a low attack complexity. Public availability of a proof of concept (POC) exploit exists for CVE-2024-21626. The potential impact of an exploit of this vulnerability is considered to be very high.
Weakness Types
What is a File descriptor leak Vulnerability?
A process does not close sensitive file descriptors before invoking a child process, which allows the child to perform unauthorized I/O operations using those descriptors. When a new process is forked or executed, the child process inherits any open file descriptors. When the child process has fewer privileges than the parent process, this might introduce a vulnerability if the child process can access the file descriptor but does not have the privileges to access the associated file.
CVE-2024-21626 has been classified to as a File descriptor leak vulnerability or weakness.
Exposure of Resource to Wrong Sphere
The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.
What is an Information Disclosure Vulnerability?
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
CVE-2024-21626 has been classified to as an Information Disclosure vulnerability or weakness.
Products Associated with CVE-2024-21626
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2024-21626 are published in these products:
Affected Versions
opencontainers runc:- Version >=v1.0.0-rc93, < 1.1.12 is affected.
- Version 0:2.440.3.1718879390-3.el8 and below * is unaffected.
- Version 0:4.15.1718879538-1.el8 and below * is unaffected.
- Version 0:1.0.0-70.rc10.el7_9 and below * is unaffected.
- Version 2:1.13.1-210.git7d71120.el7_9 and below * is unaffected.
- Version 8090020240201111813.d7b6f4b7 and below * is unaffected.
- Version 8090020240201111839.d7b6f4b7 and below * is unaffected.
- Version 8020020240206120705.28c38760 and below * is unaffected.
- Version 8020020240206120705.28c38760 and below * is unaffected.
- Version 8020020240206120705.28c38760 and below * is unaffected.
- Version 8040020240207051234.c0c392d5 and below * is unaffected.
- Version 8040020240207051234.c0c392d5 and below * is unaffected.
- Version 8040020240207051234.c0c392d5 and below * is unaffected.
- Version 8060020240205133014.3b538bd8 and below * is unaffected.
- Version 8060020240206151655.3b538bd8 and below * is unaffected.
- Version 8080020240206143933.0f77c1b7 and below * is unaffected.
- Version 4:1.1.12-1.el9_3 and below * is unaffected.
- Version 4:1.1.12-1.el9_0 and below * is unaffected.
- Version 4:1.1.12-1.el9_2 and below * is unaffected.
- Version 3:1.1.2-3.1.rhaos4.11.el8 and below * is unaffected.
- Version 3:1.1.6-5.1.rhaos4.12.el8 and below * is unaffected.
- Version v4.12.0-202503030130.p0.g7c2a284.assembly.stream.el8 and below * is unaffected.
- Version 4:1.1.12-1.rhaos4.13.el8 and below * is unaffected.
- Version v4.13.0-202503111300.p0.gb379980.assembly.stream.el8 and below * is unaffected.
- Version 4:1.1.12-1.rhaos4.14.el8 and below * is unaffected.
- Version v4.14.0-202503060906.p0.gb03f3f5.assembly.stream.el8 and below * is unaffected.
- Version 0:4.14.42-202411280904.p0.gcf4d04f.assembly.4.14.42.el9 and below * is unaffected.
- Version v4.15.0-202502171304.p0.gb74eb6d.assembly.stream.el8 and below * is unaffected.
- Version 0:4.15.41-202412091343.p0.gcf9680e.assembly.4.15.41.el9 and below * is unaffected.
- Version 0:4.16.24-202411220522.p0.gcc4fedc.assembly.4.16.24.el9 and below * is unaffected.
- Version v4.16.0-202501160405.p0.g300d9ad.assembly.stream.el9 and below * is unaffected.
- Version 0:4.17.7-202411280904.p0.g129334d.assembly.4.17.7.el9 and below * is unaffected.
- Version v4.17.0-202501052337.p0.gbb33e13.assembly.stream.el9 and below * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.