Summary
A path-manipulation flaw in Kata Containers can arise when genpolicy insufficiently validates CreateContainer mount and storage rules. A malicious host operator may be able to redirect container-rootfs mounts to sensitive host locations or provision attacker-controlled content, risking confidential data exposure and tampered inputs.
Affected context
The issue affects deployments that use Kata Containers with genpolicy to protect Confidential Containers guests. Risk is present when CreateContainer mount or storage rules are accepted without adequately constraining paths, mount targets, or provisioned content, particularly when a host operator can influence those inputs.
Exploit preconditions
- Attack surface: Host-side container creation and policy-generation
handling
- Required access: Malicious or compromised host-operator privileges capable
of influencing CreateContainer mount or storage parameters
- Trigger point: Processing and applying mount or storage rules for a
container
- Why exploitation is possible: Insufficient path and content validation may
allow attacker-controlled references to escape intended container-rootfs
boundaries or place arbitrary content at security-sensitive locations
Why this happens
The underlying bug is inadequate validation of externally influenced file paths and storage specifications. When mount sources, destinations, or provisioned content are trusted without canonicalization, boundary checks, and policy enforcement, an attacker may redirect filesystem operations to unintended locations. This behavior maps to CWE-73, External Control of File Name or Path, because controlled path data influences filesystem access or placement.
Potential impact
- An attacker may expose confidential information from sensitive host paths.
- An attacker could place or modify content used by the container or guest.
- Container workloads may accept attacker-controlled input as trusted data.
- Confidentiality and integrity protections for guest workloads may be weakened.
- The host or related workloads could face additional compromise risk if sensitive files are affected.
General mitigation guidance
Mitigation generally focuses on treating mount and storage specifications as untrusted inputs and enforcing a narrow, explicit policy. Secure-by-default designs can allow only approved source and destination roots, reject path traversal and ambiguous path forms after canonicalization, and restrict provisioning to known content types. Validation is most effective before any filesystem operation occurs and should include both source and target paths. Host operators and container-management components should receive only the privileges required for their roles, while sensitive host paths should remain inaccessible to guest provisioning workflows where possible.
How teams detect issues like this
Detection can include static-analysis rules for filesystem operations whose paths originate from container or policy inputs, along with checks for missing canonicalization, boundary validation, and allowlisting. Code review should examine CreateContainer handling for unrestricted mount sources, destinations, storage paths, and content injection points. Runtime monitoring can flag mounts targeting protected host locations or unexpected writes outside approved roots. Admission and policy enforcement can require explicit path-prefix and privilege constraints, and automated security review tools may help identify these patterns in changes.

