# CVE-2025-31133: runc container escape via "masked path" abuse due to mount race conditions

> Attackers can escape containers and access host resources by exploiting a race condition in runc's masked path verification.

- **Severity:** High 7.3 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Nov 2025
- **Updated:** 6 Nov 2025
- **Also known as:** AZL-69818, AZL-70547, AZL-70592, BELL-CVE-2025-31133, CLEANSTART-2026-PQ07861, DEBIAN-CVE-2025-31133, GHSA-9493-h29p-rfm2, GO-2025-4096, MINI-3q7j-42w7-87jc, MINI-5c88-v9v2-f922, MINI-5p2j-h4jh-2945, MINI-6998-rgw4-5gqr, MINI-6f6g-7xp4-3m56, MINI-6vp9-3gm2-vq9x, MINI-7xwp-278c-pr7h, MINI-8p5q-v73p-6qrm, MINI-98v7-rcf7-2234, MINI-fgrf-7vpq-9mvv, MINI-gfx4-rm59-qv2g, MINI-h2rj-cr24-c8v7, MINI-h83g-3x45-h3pg, MINI-hqcp-jhrr-qwfw, MINI-jqw5-jx2w-hrvv, MINI-mhcx-c4wq-rq9h, MINI-p3wv-3jw7-mg88, MINI-px5j-7ww5-7h5m, MINI-qmw8-6947-94p6, MINI-v45c-wh3x-97mv, MINI-vv4q-r5pq-g4cf, UBUNTU-CVE-2025-31133

## What is CVE-2025-31133?

CVE-2025-31133 is a high-severity vulnerability in opencontainers runc, published on 6 Nov 2025. 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 according to the OCI specification. In versions 1.2.7 and below, 1.3.0-rc.1 through 1.3.1, 1.4.0-rc.1 and 1.4.0-rc.2 files, runc would not perform sufficient verification that the source of the bind-mount (i.e., the container's /dev/null) was actually a real /dev/null inode when using the container's /dev/null to mask. This exposes two methods of attack:  an arbitrary mount gadget, leading to host information disclosure, host denial of service, container escape, or a bypassing of maskedPaths. This issue is fixed in versions 1.2.8, 1.3.3 and 1.4.0-rc.3.

Weakness: CWE-61 (UNIX Symbolic Link (Symlink) Following), CWE-363 (Race Condition Enabling Link Following)

## Which versions are affected by CVE-2025-31133?

7 open source packages ship an affected version, including github.com/opencontainers/runc. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/opencontainers/runc` | Go | All versions | 1.2.8, 1.3.3, 1.4.0-rc.3 |
| `github.com/opencontainers/runc` | Go | All versions | 1.2.8 |
| `github.com/opencontainers/runc` | Go | All versions | 1.2.8 |
| `github.com/opencontainers/runc` | Go | From 1.3.0-rc.1 | 1.3.3 |
| `github.com/opencontainers/runc` | Go | From 1.3.0-rc.1 | 1.3.3 |
| `github.com/opencontainers/runc` | Go | From 1.4.0-rc.1 | 1.4.0-rc.3 |
| `github.com/opencontainers/runc` | Go | From 1.4.0-rc.1 | 1.4.0-rc.3 |

Products: Linuxfoundation Runc.

## How do I fix CVE-2025-31133?

Upgrade github.com/opencontainers/runc to a fixed version for your release line: 1.2.8, 1.3.3 or 1.4.0-rc.3.

## Is CVE-2025-31133 being exploited?

There is no known exploitation of CVE-2025-31133 in the wild and no public exploit code.

Public exploit code:

- CVE-2025-31133 PoC (github_poc): https://github.com/skynet-f-nvidia/CVE-2025-31133
- POCs and Tetragon Rules for CVE-2024-21626 and CVE-2025-31133 (github_poc): https://github.com/scherepiuk/container-escape-ebpf
- Learn about CVE-2025-31133 (github_poc): https://github.com/C-h4ck-0/Learn-about-cve-2025-31133-poc

## Other vulnerabilities in opencontainers runc

- [CVE-2025-52565](https://insights.sbomify.com/CVE-2025-52565/): container escape due to /dev/console mount and related races (high 8.4)
- [CVE-2025-52881](https://insights.sbomify.com/CVE-2025-52881/): runc: LSM labels can be bypassed with malicious config using dummy procfs files (high 7.3)
- [CVE-2023-28642](https://insights.sbomify.com/CVE-2023-28642/): AppArmor bypass with symlinked /proc in runc (medium 6.1)
- [CVE-2023-25809](https://insights.sbomify.com/CVE-2023-25809/): rootless: `/sys/fs/cgroup` is writable when cgroupns isn't unshared in runc (medium 5.0)
- [CVE-2024-45310](https://insights.sbomify.com/CVE-2024-45310/): runc can be confused to create empty files/directories on the host (low 3.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-31133 and fix it if it is affected.

What it is: CVE-2025-31133 is a high-severity vulnerability in opencontainers runc, published on 6 Nov 2025. 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: There is no known exploitation of CVE-2025-31133 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/opencontainers/runc (Go): affected all versions; fixed in 1.2.8, 1.3.3, 1.4.0-rc.3
- github.com/opencontainers/runc (Go): affected all versions; fixed in 1.2.8
- github.com/opencontainers/runc (Go): affected all versions; fixed in 1.2.8
- github.com/opencontainers/runc (Go): affected from 1.3.0-rc.1; fixed in 1.3.3
- github.com/opencontainers/runc (Go): affected from 1.3.0-rc.1; fixed in 1.3.3
- github.com/opencontainers/runc (Go): affected from 1.4.0-rc.1; fixed in 1.4.0-rc.3
- github.com/opencontainers/runc (Go): affected from 1.4.0-rc.1; fixed in 1.4.0-rc.3

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-2025-31133/ (Markdown: https://insights.sbomify.com/CVE-2025-31133/index.md)
```

## Sources

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

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