---
title: "runc Container Escapes: Three Mount-Race CVEs Fixed"
url: https://erroneo.us/security/briefs/runc-container-escape-cve-2025-31133/
description: "CVE-2025-31133, -52565, -52881 let a malicious image or Dockerfile escape runc containers. Fixed in runc 1.2.8/1.3.3/1.4.0-rc.3. Patch this week."
type: security-brief
section: "Security Digest"
date_published: 2025-11-05
date_modified: 2026-10-21
publisher: erroneo.us
author: erroneo.us Security Desk
verdict: "Patch this week"
cves: ["CVE-2025-31133", "CVE-2025-52565", "CVE-2025-52881"]
severity: "high"
exploited: "none-known"
kev: false
license: All rights reserved. Quote with attribution and a link.
---

# runc Container Escapes: Three Mount-Race CVEs Fixed

**Verdict: Patch this week.** Not remotely exploitable and not seen in attacks, but anyone who runs or builds images they do not fully trust (CI runners, multi-tenant clusters) should roll out patched runc this week.

- **Who must act:** Operators of shared CI/build runners, multi-tenant Kubernetes, and any host that runs third-party images or untrusted Dockerfiles on runc below 1.2.8/1.3.3.
- **Who can relax:** Single-tenant hosts that only run images you build from reviewed sources, and rootless or user-namespaced setups, where impact is largely neutralized; patch on the normal cycle.
- **Affected:** runc 1.2.7 and earlier; runc 1.3.0-rc.1 through 1.3.2; runc 1.4.0-rc.1 and 1.4.0-rc.2; runc 1.1.x and earlier (unsupported, unpatched); CVE-2025-52565: runc 1.0.0-rc3 and later in those lines
- **Fixed:** runc 1.2.8; runc 1.3.3; runc 1.4.0-rc.3 and later; opencontainers/selinux 1.13.0 (for CVE-2025-52881)
- **CVEs:** CVE-2025-31133, CVE-2025-52565, CVE-2025-52881
- **CISA KEV:** no · **Exploitation:** No known exploitation

## What to do

1. Check the runtime on each node: runc --version (or docker info | grep -i runc; containerd ships its own runc binary)
2. Upgrade runc to 1.2.8, 1.3.3 or later via your distro, Docker Engine, containerd or managed-Kubernetes node image updates
3. Prioritize CI runners, BuildKit/buildx builders and multi-tenant nodes that run untrusted images or Dockerfiles
4. Enable user namespaces without mapping host root, or use rootless containers, as the runc maintainers recommend
5. Stop running unverified images; pin by digest and restrict who can submit custom mount configurations

### How to check if you are affected

- Inventory runc versions across nodes and builders; anything below the fixed versions is exposed
- Alert on containers whose /dev/null or /dev/console is a symlink or not the expected device node at start-up
- Monitor for writes to /proc/sys/kernel/core_pattern or /proc/sysrq-trigger originating from container contexts
- Review build logs for Dockerfiles that run parallel stages with custom shared mounts

## What happened

On November 5, 2025, the runc maintainers published one patch set fixing three related container-escape flaws. runc is the low-level OCI runtime underneath Docker, containerd and most Kubernetes clusters. All three abuse the way runc sets up mounts as a container starts. An attacker who can race runc during that window can redirect a mount or a `/proc` write to a target of their choosing.

- **CVE-2025-31133** ([GHSA-9493-h29p-rfm2](https://github.com/opencontainers/runc/security/advisories/GHSA-9493-h29p-rfm2), CVSS 4.0 7.3): runc hides sensitive paths by bind-mounting the container's `/dev/null` over them, but never checked that it was a real `/dev/null`. Swap it out, and the "mask" becomes a writable mount of an arbitrary host path. The advisory notes that writable `/proc/sys/kernel/core_pattern` leads to escape, and `/proc/sysrq-trigger` to host denial of service.
- **CVE-2025-52565** ([CVE record](https://www.cve.org/CVERecord?id=CVE-2025-52565), CVSS 4.0 8.4): the same idea applied to the `/dev/pts/$n` to `/dev/console` bind mount.
- **CVE-2025-52881** ([GHSA-cgrx-mc8f-2prm](https://github.com/opencontainers/runc/security/advisories/GHSA-cgrx-mc8f-2prm), CVSS 4.0 7.3): runc's own writes to `/proc` can be redirected to other procfs files. That can silently drop AppArmor/SELinux labels, or reach `core_pattern` and `sysrq-trigger`. Docker's Tõnis Tiigi and Li Fubang found it independently.

SUSE's Aleksa Sarai, a runc maintainer, coordinated the disclosure, [BleepingComputer reported](https://www.bleepingcomputer.com/news/security/dangerous-runc-flaws-could-allow-hackers-to-escape-docker-containers/).

## Who is affected

runc 1.2.7 and earlier, 1.3.0-rc.1 through 1.3.2, and 1.4.0-rc.1/rc.2 are affected. Fixes are in 1.2.8, 1.3.3 and 1.4.0-rc.3. runc 1.1.x and older are unsupported and were not patched. In practice, most Docker Engine, containerd and Kubernetes node images from before November 2025 are affected. You usually get the fix through a Docker, containerd, distro or managed node-image update, not by installing runc yourself. The advisories say crun and youki were notified and may be similarly affected. LXC is likely not affected.

## Do you really need to act?

These are not remote bugs. The attacker must be able to start containers with a custom mount configuration. Per the advisories, a standard Dockerfile built with `docker buildx build` can trigger the needed parallel containers, and so can a malicious image. The CVE records list no known exploitation, and no attacks had been reported when the flaws were disclosed.

So the question is whether untrusted code ever reaches your runtime. For shared CI runners, build farms that accept outside pull requests, and multi-tenant clusters, the answer is yes, and a container escape there means root on the host plus every other tenant's secrets. Patch those this week. On a single-tenant host that only runs images you build from reviewed sources, the risk is low and normal patching is fine. Rootless containers, or user namespaces that do not map host root, largely neutralize these bugs. AppArmor helps less than you might hope, because CVE-2025-52881 can bypass LSM labels, and the advisory says SELinux has limited effect here.

## What to do now

1. Check what each node actually runs: `runc --version`, `docker info | grep -i runc`, or `containerd --version` plus the bundled runc. Managed Kubernetes users should check the provider's node-image bulletin.
2. Upgrade to runc 1.2.8, 1.3.3 or later, usually by updating Docker Engine, containerd or the node image, then restart the daemon and drain or recycle nodes.
3. Do CI runners and buildx/BuildKit builders first.
4. Turn on user namespaces (Kubernetes `hostUsers: false` where supported, or Docker `userns-remap`), or move to rootless mode.
5. Stop pulling unverified images. Pin by digest and gate who can submit custom mount configurations.

## How to tell if you were hit

There is no simple indicator. Sysdig, as quoted by BleepingComputer, suggests monitoring for suspicious symlink behavior during container start. For example, alert when `/dev/null` or `/dev/console` inside a new container is a symlink or not the expected device. Watch for container-originated writes to `/proc/sys/kernel/core_pattern` or `/proc/sysrq-trigger`, and for an unexpected `core_pattern` value on hosts (`cat /proc/sys/kernel/core_pattern`). On shared builders, review recent Dockerfiles that use parallel stages with custom shared mounts.

## Timeline

- Nov 5, 2025 — runc publishes the three advisories and releases 1.2.8, 1.3.3 and 1.4.0-rc.3.
- Nov 6, 2025 — CVE records published. CISA's assessment is no known exploitation.
- Nov 9, 2025 — Wider press coverage. Downstream runtimes and distros ship updates.

## Sources

1. [runc — GHSA-9493-h29p-rfm2 (CVE-2025-31133)](https://github.com/opencontainers/runc/security/advisories/GHSA-9493-h29p-rfm2)
2. [runc — GHSA-cgrx-mc8f-2prm (CVE-2025-52881)](https://github.com/opencontainers/runc/security/advisories/GHSA-cgrx-mc8f-2prm)
3. [CVE.org — CVE-2025-52565 record](https://www.cve.org/CVERecord?id=CVE-2025-52565)
4. [BleepingComputer — Dangerous runC flaws could allow hackers to escape Docker containers](https://www.bleepingcomputer.com/news/security/dangerous-runc-flaws-could-allow-hackers-to-escape-docker-containers/)

---
Source page: https://erroneo.us/security/briefs/runc-container-escape-cve-2025-31133/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
