GO-2026-5638: Kata Containers have VM Escape via virtiofsd Argument Injection through Default-Enabled Pod Annotations
Kata Containers is an open source project focusing on a standard implementation of lightweight Virtual Machines (VMs) that perform like containers. Versions prior to 3.31.0 ship with a default configuration that allows pod creators to inject arbitrary command-line arguments into the virtiofsd process through the io.katacontainers.config.hypervisor.virtiofsextraargs pod annotation. By injecting -o source=/ along with --no-announce-submounts and --sandbox=none, an attacker can override the virtiofsd shared directory to serve the entire host root filesystem into the guest VM. Combined with the kernelparams annotation (also enabled by default) to activate the agent debug console, the attacker can mount the host filesystem from inside the VM and read or write any file on the host, including /etc/shadow. Version 3.31.0 patches the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Kata Containersto a version that resolves this vulnerability.Fixed in 3.31.0
Event History
Frequently Asked Questions
Who can exploit this issue in practice?
A pod creator who can set Kata Containers pod annotations can exploit it. The attack requires use of both the virtio_fs_extra_args annotation and the kernel_params annotation.
Are default Kata Containers deployments affected?
Yes. Versions prior to 3.31.0 ship with a default configuration that enables the annotations needed for the attack.
What access does successful exploitation provide?
An attacker can expose the host root filesystem inside the guest VM, then mount it using the agent debug console. This permits reading or writing arbitrary host files, including /etc/shadow.
What should be done if upgrading is not immediately possible?
Prevent pod creators from supplying the io.katacontainers.config.hypervisor.virtio_fs_extra_args and kernel_params annotations. These annotations are the default-enabled controls used to inject virtiofsd arguments and activate the agent debug console.
Which version fixes the issue?
Kata Containers 3.31.0 patches the issue.