The vulnerability allowed a user with permissions to create or update Fission Environment or Function resources to escalate their privileges and compromise a Kubernetes node. This was possible due to two main failures in the Fission platform:
-
Insufficient Admission Validation: The primary validation logic, found in (*v1.Environment).Validate and (v1.FunctionSpec).Validate, did not inspect the contents of user-provided pod specifications (podSpec). This allowed users to submit CRDs containing dangerous settings like hostNetwork: true, hostPID: true, privileged: true, or hostPath volumes. Furthermore, the validation webhook for Environments only triggered on CREATE operations, allowing an attacker to create a benign resource and then UPDATE it with a malicious podSpec to bypass checks.
-
Insecure PodSpec Merging: The util.MergePodSpec function, which is used by Fission's runtime and builder components, would then take the user's malicious podSpec and merge it into the final pod definition. The vulnerable version of this function blindly propagated the dangerous fields, directly causing the creation of a privileged pod with access to the host node's resources.
An attacker could exploit this to create a pod that shares the host's network, PID, and IPC namespaces, and has privileged container settings. From this position, they could gain root access to the node, access the container runtime socket, steal cloud credentials, and potentially take over the entire cluster. The patch remediates this by adding strict validation at the admission layer via a new ValidatePodSpecSafety function and implementing defense-in-depth by stripping out dangerous fields at the merge layer, ensuring that such settings are never propagated to the final pods.