malicious image can bind-mount an arbitrary host directory into a container across checkpoint/restore
Description
When a container is checkpointed and restored with CRIU, runc registers every bind mount (and every device) of the container configuration with CRIU as an external mount, using the mount destination resolved inside the container's own rootfs as the lookup key. CRIU encodes each external mount as the single string mnt[KEY]:VAL and looks entries up by prefix, so a key that contains ]: terminates early and shifts the boundary between the key and the value. A malicious image can therefore place ]: in a symlink target in its rootfs and make runc restore, running as host root, bind-mount a host path that the configuration never named into the restored container, read-write.
This is the same issue as CVE-2026-115520 (GHSA-2mxx-58qc-p466) in crun.
Affected since runc 1.1.0, which added the symlink resolution of mount destinations for checkpoint/restore (commit 74ae9e0f, "checkpoint: resolve symlink for external bind mount"). Exploitation requires an operator who runs runc checkpoint followed by runc restore on the container (directly, or via a container engine such as containerd, CRI-O or Podman). Since CRIU requires root, so do runc checkpoint and restore.
Details
addCriuDumpMount and addCriuRestoreMount in libcontainer/criu_linux.go compute the key as
mountDest := m.Destination
if dest, err := securejoin.SecureJoin(c.config.Rootfs, mountDest); err == nil {
mountDest = dest[len(c.config.Rootfs):]
}SecureJoin expands the destination's symlinks inside the container rootfs, which the container controls, keeps any nonexistent trailing components verbatim, and the result is passed to CRIU unchecked. CRIU stores the pair as mnt[KEY]:VAL and looks entries up by prefix, so everything after the first ]: in KEY becomes the beginning of VAL, which is the host path CRIU bind-mounts on restore.
The container does not need to replace a mount point, only to rename its parent: for example, /etc is not a mount point, so the container can rename /etc to /e and recreate /etc with symlinks of its choosing. One symlink provides the key recorded in the checkpoint image, another one re-splits that key on restore so that the value becomes a path under the rootfs, which in turn is a symlink to the host directory of the attacker's choice. CRIU resolves this path in the host mount namespace and bind-mounts it into the container. See GHSA-2mxx-58qc-p466 for a detailed walkthrough, which applies to runc as is.
With CRIU's default mount engine, the final component of the host path is still the base name of one of the container's own bind sources, while the directory part is entirely attacker-chosen. With the older engine (mntns-compat-mode), this restriction does not apply.
An empty key (the destination resolves to the rootfs itself) is a second instance of the same problem: CRIU reads mnt[] as a request to autodetect external mounts.
Unlike crun, runc also registers the container's devices with CRIU this way (Destination: node.Path), and their keys are resolved in the rootfs too. The masked paths are passed as is, from the configuration, and are not affected.
Proof of concept
The integration test added by the fix ("checkpoint and restore (bind mount, destination resolves to invalid CRIU key)" in tests/integration/checkpoint.bats) demonstrates the root cause: with an unpatched runc, after the parent directory of a bind mount destination is replaced, the resolved key containing ]: is passed to CRIU and runc checkpoint succeeds.
An end-to-end reproduction, in which the restored container gets a host directory bind-mounted into it, is described in GHSA-2mxx-58qc-p466 for crun. The same steps apply to runc, since both runtimes build the CRIU keys the same way; an end-to-end run against runc has not been done separately.
Impact
A malicious image (or a compromised process running as root inside the container) can, when the container is checkpointed and later restored, make runc running as host root expose a host directory chosen by the attacker inside the restored container, read-write. This breaks the isolation between the container and the host, and may lead to disclosure or modification of host files, and potentially to a full host compromise.
Only users who both checkpoint and restore containers running untrusted images are affected. Containers that are never restored are not affected; in particular, checkpointing alone (such as the Kubernetes forensic container checkpointing feature) does not trigger the issue, unless the checkpoint is later restored. The default CRIU mount engine limits which host paths can be reached (see Details); with mntns-compat-mode, any host path can be reached.
Patches
Fixed in runc 1.3.7, 1.4.4, 1.5.3, and 1.6.0-rc.2, which refuse CRIU external mount keys that are empty or contain ]:.
Workarounds
- Upgrade CRIU to 4.3.1 or later, which fixes the issue on the CRIU side (GHSA-7ww7-53q2-wrwx, CVE-2026-119614) and thus also protects older runc versions.
- Do not restore checkpoints of containers running untrusted images.
Credits
Giuseppe Scrivano (@giuseppe) submitted crun to Anthropic's OSS Scanner, which found the issue. The root cause is in CRIU, while runc and crun now refuse such mount keys, so they are protected even with an unpatched CRIU.