# CVE-2024-21626: runc container breakout through process.cwd trickery and leaked fds

> Attackers can escape containers and execute code on the host by exploiting a file descriptor leak that exposes the host filesystem.

- **Severity:** High 8.6 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 31 Jan 2024
- **Updated:** 17 Sep 2026
- **Also known as:** ALSA-2024:0670, ALSA-2024:0752, AZL-34060, AZL-34074, AZL-34075, AZL-34087, AZL-34642, AZL-34896, AZL-34905, AZL-35006, AZL-39606, AZL-43429, AZL-43789, AZL-44226, AZL-44340, BELL-CVE-2024-21626, CLEANSTART-2026-CY16593, DEBIAN-CVE-2024-21626, DSA-5615-1, GHSA-xr7r-f8xq-vfvv, GO-2024-2491, OESA-2024-1182, RHEA-2024:6124, RHSA-2024:0645, RHSA-2024:0662, RHSA-2024:0666, RHSA-2024:0670, RHSA-2024:0684, RHSA-2024:0717, RHSA-2024:0752, RHSA-2024:0755, RHSA-2024:0756, RHSA-2024:0757, RHSA-2024:0758, RHSA-2024:0759, RHSA-2024:0760, RHSA-2024:0764, RHSA-2024:10149, RHSA-2024:10520, RHSA-2024:10525, RHSA-2024:10841, RHSA-2024:1270, RLSA-2024:0752, SUSE-SU-2024:0294-1, SUSE-SU-2024:0295-1, SUSE-SU-2024:0328-1, SUSE-SU-2024:0459-1, UBUNTU-CVE-2024-21626, USN-6619-1, openSUSE-SU-2024:13644-1, openSUSE-SU-2024:13754-1

## What is CVE-2024-21626?

CVE-2024-21626 is a high-severity path traversal vulnerability in Fedoraproject Fedora, published on 31 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official 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.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor), CWE-668 (Exposure of Resource to Wrong Sphere), CWE-403 (Exposure of File Descriptor to Unintended Control Sphere)

## Which versions are affected by CVE-2024-21626?

3 open source packages ship an affected version, including github.com/opencontainers/runc. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/opencontainers/runc` | Go | From 1.0.0-rc93 | 1.1.12 |
| `github.com/opencontainers/runc` | Go | From 1.0.0-rc93 | 1.1.12 |
| `github.com/opencontainers/runc` | Go | From 1.0.0-rc93 | 1.1.12 |
| `aardvark-dns` | AlmaLinux:8 | All versions | 2:1.7.0-1.module_el8.9.0+3657+d86e192f |
| `buildah` | AlmaLinux:8 | All versions | 1:1.31.3-3.module_el8.9.0+3717+81096349 |
| `buildah-tests` | AlmaLinux:8 | All versions | 1:1.31.3-3.module_el8.9.0+3717+81096349 |
| `cockpit-podman` | AlmaLinux:8 | All versions | 75-1.module_el8.9.0+3643+9234dc3b |
| `conmon` | AlmaLinux:8 | All versions | 3:2.1.8-1.module_el8.9.0+3643+9234dc3b |
| `container-selinux` | AlmaLinux:8 | All versions | 2:2.221.0-1.module_el8.9.0+3643+9234dc3b |
| `containernetworking-plugins` | AlmaLinux:8 | All versions | 1:1.3.0-8.module_el8.9.0+3717+81096349 |
| `containers-common` | AlmaLinux:8 | All versions | 2:1-71.module_el8.9.0+3717+81096349 |
| `crit` | AlmaLinux:8 | All versions | 3.18-4.module_el8.9.0+3643+9234dc3b |
| `criu` | AlmaLinux:8 | All versions | 3.18-4.module_el8.9.0+3643+9234dc3b |
| `criu-devel` | AlmaLinux:8 | All versions | 3.18-4.module_el8.9.0+3643+9234dc3b |
| `criu-libs` | AlmaLinux:8 | All versions | 3.18-4.module_el8.9.0+3643+9234dc3b |
| `crun` | AlmaLinux:8 | All versions | 1.8.7-1.module_el8.9.0+3643+9234dc3b |
| `fuse-overlayfs` | AlmaLinux:8 | All versions | 1.12-1.module_el8.9.0+3643+9234dc3b |
| `libslirp` | AlmaLinux:8 | All versions | 4.4.0-1.module_el8.8.0+3615+3543c705 |
| `libslirp-devel` | AlmaLinux:8 | All versions | 4.4.0-1.module_el8.8.0+3615+3543c705 |
| `netavark` | AlmaLinux:8 | All versions | 2:1.7.0-2.module_el8.9.0+3717+81096349 |
| `oci-seccomp-bpf-hook` | AlmaLinux:8 | All versions | 1.2.9-1.module_el8.9.0+3643+9234dc3b |
| `podman` | AlmaLinux:8 | All versions | 3:4.6.1-8.module_el8.9.0+3717+81096349 |
| `podman-catatonit` | AlmaLinux:8 | All versions | 3:4.6.1-8.module_el8.9.0+3717+81096349 |
| `podman-docker` | AlmaLinux:8 | All versions | 3:4.6.1-8.module_el8.9.0+3717+81096349 |
| `podman-gvproxy` | AlmaLinux:8 | All versions | 3:4.6.1-8.module_el8.9.0+3717+81096349 |
| `podman-plugins` | AlmaLinux:8 | All versions | 3:4.6.1-8.module_el8.9.0+3717+81096349 |
| `podman-remote` | AlmaLinux:8 | All versions | 3:4.6.1-8.module_el8.9.0+3717+81096349 |
| `podman-tests` | AlmaLinux:8 | All versions | 3:4.6.1-8.module_el8.9.0+3717+81096349 |
| `python3-criu` | AlmaLinux:8 | All versions | 3.18-4.module_el8.9.0+3643+9234dc3b |
| `python3-podman` | AlmaLinux:8 | All versions | 4.6.0-2.module_el8.9.0+3717+81096349 |
| `runc` | AlmaLinux:8 | All versions | 1:1.1.12-1.module_el8.9.0+3717+81096349 |
| `skopeo` | AlmaLinux:8 | All versions | 2:1.13.3-3.module_el8.9.0+3717+81096349 |
| `skopeo-tests` | AlmaLinux:8 | All versions | 2:1.13.3-3.module_el8.9.0+3717+81096349 |
| `slirp4netns` | AlmaLinux:8 | All versions | 1.2.1-1.module_el8.9.0+3643+9234dc3b |
| `toolbox` | AlmaLinux:8 | All versions | 0.0.99.4-5.module_el8.9.0+3643+9234dc3b |
| `toolbox-tests` | AlmaLinux:8 | All versions | 0.0.99.4-5.module_el8.9.0+3643+9234dc3b |
| `udica` | AlmaLinux:8 | All versions | 0.2.6-20.module_el8.8.0+3615+3543c705 |
| `runc` | AlmaLinux:9 | All versions | 4:1.1.12-1.el9_3 |
| `aardvark-dns` | Red Hat:enterprise_linux:8::appstream | All versions | 2:1.7.0-1.module+el8.9.0+21243+a586538b |
| `buildah` | Red Hat:enterprise_linux:8::appstream | All versions | 1:1.31.3-3.module+el8.9.0+21243+a586538b |

Products: Fedoraproject Fedora, Linuxfoundation Runc.

## How do I fix CVE-2024-21626?

Upgrade github.com/opencontainers/runc to 1.1.12 or later.

## Is CVE-2024-21626 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21626 exists.

Public exploit code:

- PoC and Detection for CVE-2024-21626 (github_poc): https://github.com/NitroCao/CVE-2024-21626
- https://github.com/V0WKeep3r/CVE-2024-21626-runcPOC (github_poc): https://github.com/V0WKeep3r/CVE-2024-21626-runcPOC
- CVE-2024-21626-poc-research-Reappearance-andtodo (github_poc): https://github.com/cdxiaodong/CVE-2024-21626
- https://github.com/zhangguanzhang/CVE-2024-21626 (github_poc): https://github.com/zhangguanzhang/CVE-2024-21626
- Container Runtime Meetup #5 のLT用のデモ (github_poc): https://github.com/laysakura/CVE-2024-21626-demo
- https://github.com/Sk3pper/CVE-2024-21626 (github_poc): https://github.com/Sk3pper/CVE-2024-21626

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-21626 and fix it if it is affected.

What it is: CVE-2024-21626 is a high-severity path traversal vulnerability in Fedoraproject Fedora, published on 31 Jan 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-21626 exists.

Affected packages and fixed versions:
- github.com/opencontainers/runc (Go): affected from 1.0.0-rc93; fixed in 1.1.12
- github.com/opencontainers/runc (Go): affected from 1.0.0-rc93; fixed in 1.1.12
- github.com/opencontainers/runc (Go): affected from 1.0.0-rc93; fixed in 1.1.12

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-21626/ (Markdown: https://insights.sbomify.com/CVE-2024-21626/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-21626
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-21626
- OSV: https://osv.dev/vulnerability/CVE-2024-21626

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-21626/
Summaries are generated and may contain mistakes; the official description above is the record.
