# CVE-2025-52565: container escape due to /dev/console mount and related races

> Attackers can exploit race conditions in runc to escape containers or cause host denial of service by manipulating /dev/console mounts.

- **Severity:** High 8.4 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA: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:** 6 Nov 2025
- **Updated:** 6 Nov 2025
- **Also known as:** AZL-69821, AZL-70513, AZL-70589, BELL-CVE-2025-52565, DEBIAN-CVE-2025-52565, GHSA-qw9x-cqr3-wc7r, GO-2025-4097, MINI-2h4r-3wqg-gh7q, MINI-52q5-mfcm-h6xh, MINI-5x3q-3wxr-f35v, MINI-6c22-3mh6-7xp4, MINI-6h65-5p55-j9fr, MINI-6jw7-j376-p8xf, MINI-6w9x-344v-fgxh, MINI-874p-473h-6pmj, MINI-8ggh-4r98-rgvq, MINI-8pvw-x7m6-m3jh, MINI-94vx-6wcc-cpvw, MINI-cc4v-j8mf-pp22, MINI-fg4v-42hm-9jh7, MINI-g4wp-j2w3-4w8c, MINI-gxww-6px3-jr2v, MINI-prxx-3wm4-27gg, MINI-r5m5-7m77-v5c7, MINI-vjpq-g4p8-hq6g, MINI-wvp3-pp8q-9595, MINI-xc4r-5hmq-r34q, MINI-xwmp-xw3f-2mxf, UBUNTU-CVE-2025-52565

## What is CVE-2025-52565?

CVE-2025-52565 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. Versions 1.0.0-rc3 through 1.2.7, 1.3.0-rc.1 through 1.3.2, and 1.4.0-rc.1 through 1.4.0-rc.2, due to insufficient checks when bind-mounting `/dev/pts/$n` to `/dev/console` inside the container, an attacker can trick runc into bind-mounting paths which would normally be made read-only or be masked onto a path that the attacker can write to. This attack is very similar in concept and application to CVE-2025-31133, except that it attacks a similar vulnerability in a different target (namely, the bind-mount of `/dev/pts/$n` to `/dev/console` as configured for all containers that allocate a console). This happens after `pivot_root(2)`, so this cannot be used to write to host files directly -- however, as with CVE-2025-31133, this can load to denial of service of the host or a container breakout by providing the attacker with a writable copy of `/proc/sysrq-trigger` or `/proc/sys/kernel/core_pattern` (respectively). 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-52565?

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 | From 1.0.0-rc3 | 1.2.8, 1.3.3, 1.4.0-rc.3 |
| `github.com/opencontainers/runc` | Go | From 1.0.0-rc3 | 1.2.8 |
| `github.com/opencontainers/runc` | Go | From 1.0.0-rc3 | 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-52565?

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-52565 being exploited?

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

## Other vulnerabilities in opencontainers runc

- [CVE-2025-31133](https://insights.sbomify.com/CVE-2025-31133/): runc container escape via "masked path" abuse due to mount race conditions (high 7.3)
- [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-52565 and fix it if it is affected.

What it is: CVE-2025-52565 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-52565 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/opencontainers/runc (Go): affected from 1.0.0-rc3; fixed in 1.2.8, 1.3.3, 1.4.0-rc.3
- github.com/opencontainers/runc (Go): affected from 1.0.0-rc3; fixed in 1.2.8
- github.com/opencontainers/runc (Go): affected from 1.0.0-rc3; 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-52565/ (Markdown: https://insights.sbomify.com/CVE-2025-52565/index.md)
```

## Sources

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

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