Summary
FakeFish passes incoming credentials to scripts, but its KubeVirt integration relies on a mounted KUBECONFIG file and does not validate those credentials. As a result, any user able to use the affected cluster may control virtual machines associated with the FakeFish instance, including powering them on or off and attaching arbitrary CD images.
Affected context
The issue occurs when FakeFish is used with KubeVirt rather than physical hardware whose BMC validates supplied credentials. In this deployment model, the container uses a mounted KUBECONFIG for Kubernetes access while incoming credentials are effectively ignored, potentially allowing cluster users to operate VMs belonging to another user.
Exploit preconditions
- Attack surface: FakeFish's KubeVirt integration and its Kubernetes API access
- Required access: Access as a user of the affected Kubernetes cluster, subject to the permissions exposed by the deployment
- Trigger point: Requests that invoke VM management operations through FakeFish
- Why exploitation is possible: The integration does not authenticate or authorize the incoming credentials against the requested operation and instead uses the container's mounted KUBECONFIG
Why this happens
The underlying flaw is a missing authentication and authorization decision at the integration boundary. Credentials supplied by callers are passed to scripts but are not used to establish identity or validate permission when the backend is KubeVirt. The implementation therefore treats possession of access to the service or cluster context as sufficient for VM operations, mapping to CWE-306: Missing Authentication for Critical Function.
Potential impact
- Unauthorized users may control another user's virtual machines
- Attackers could power VMs on or off
- Attackers could attach arbitrary CD images
- Guest operating systems and their data may be modified or compromised
- Availability, integrity, and isolation of hosted workloads could be affected
General mitigation guidance
Mitigation generally focuses on making authentication and authorization explicit for every sensitive VM operation.
Common defensive patterns include:
- Validate caller credentials rather than merely forwarding or accepting them
- Enforce authorization against the specific VM and requested operation
- Use narrowly scoped service accounts and least-privilege Kubernetes RBAC
- Avoid shared credentials or broad KUBECONFIG permissions across tenants
- Apply tenant isolation and deny-by-default policies for VM management actions
- Treat media attachment and power control as separately protected operations
- Ensure failed, missing, or mismatched credentials cannot fall back to ambient container identity
How teams detect issues like this
Organizations can look for:
- Code paths that accept credentials but do not verify identity or permissions
- Integrations that use ambient Kubernetes credentials instead of caller-scoped authorization
- VM management endpoints lacking operation-level authorization checks
- Kubernetes audit events showing unexpected power-state changes or CD-image attachments
- Static analysis and code review rules for ignored authentication parameters and shared credential usage
- Policy enforcement requiring least-privilege service accounts and explicit authorization at service boundaries

