Summary
A critical path validation flaw in Kata Containers allows a pod user to influence which host-side TOML configuration file the runtime loads. If the user can place a file at a host-visible path, the configuration may select attacker-controlled virtualization binaries and execute code with host-root privileges.
Affected context
The issue occurs in Kata Containers deployments using kata-runtime versions before 4.0.0 when pod annotations can specify an io.katacontainers.config_path value. Risk exists where a pod user can create or influence files at paths visible to the host and the runtime loads those files without restricting their location or validating their contents.
Exploit preconditions
- Attack surface: The kata-runtime pod annotation and host-side configuration
loading path
- Required access: Ability to create or place a file at a host-visible path
and influence the relevant pod annotation
- Trigger point: Runtime processing of the configured TOML file during pod
startup or configuration
- Why exploitation is possible: The annotation accepts an unrestricted path,
and the loaded configuration can select executable hypervisor or virtio-fs
daemon binaries
Why this happens
The underlying flaw is insufficient validation of a user-influenced configuration path. The runtime treats the annotation as a trusted reference to a host file instead of constraining it to an approved directory and validating the resulting configuration. This combines CWE-20, Improper Input Validation, with CWE-22, Path Traversal, because an attacker-controlled path can escape intended configuration boundaries and affect privileged executable selection.
Potential impact
- An attacker may execute arbitrary code as root on the host.
- A compromised pod could undermine the VM or container isolation boundary.
- Host files, workloads, and credentials could be accessed or modified.
- An attacker could use the host compromise for lateral movement or persistence.
- Cluster integrity and availability could be affected.
General mitigation guidance
Mitigation generally focuses on removing trust from pod-supplied configuration paths and protecting privileged executable selection. Secure-by-default patterns include allowing only predefined configuration identifiers or immutable, administrator-controlled paths; canonicalizing and validating paths against an approved directory; applying strict TOML schemas and executable allowlists; and rejecting unexpected annotations. Host and runtime components should operate with least privilege, while file creation and mount policies should reduce pod access to host-visible locations.
How teams detect issues like this
Detection can include static analysis and code review rules for annotations or APIs that directly construct host paths from pod-controlled input. Review signals include missing canonicalization, unrestricted file reads, absent allowlists for binaries, and configuration parsing performed before policy checks. Runtime monitoring can alert on unusual io.katacontainers.config_path values, host-visible file creation by pods, and unexpected hypervisor or virtio-fs daemon execution. Admission policies can restrict the annotation and enforce approved runtime configurations.

