The vulnerability is a critical privilege escalation issue in Fission, stemming from three interconnected flaws. First, the validation logic for Fission's Environment and Function custom resources was insufficient. The v1.Environment.Validate and v1.FunctionSpec.Validate functions in pkg/apis/core/v1/validation.go failed to check for dangerous fields within user-supplied PodSpec definitions. Second, a webhook misconfiguration in pkg/webhook/environment.go meant this already-weak validation was completely bypassed for UPDATE operations on Environment resources. An attacker could therefore create a seemingly benign Environment and then use a patch request to inject a malicious PodSpec.
The third flaw, and the one that enables the final-stage exploit, was in pkg/executor/util/merge.go. The util.MergePodSpec function would unconditionally merge the user's malicious PodSpec, including dangerous fields like hostNetwork, hostPID, privileged: true, and hostPath volumes, into the pod template used by Fission's runtime and build components. This resulted in the creation of a privileged pod with access to the underlying node.
A related issue in pkg/buildermgr/envwatcher.go within the environmentWatcher.createBuilderDeployment function also contributed. It improperly allowed the powerful fission-builder service account token to be mounted into user-defined builder containers, allowing a malicious builder image to escalate privileges within the cluster.
An attacker with permissions to create or update Fission Environments could exploit this chain of flaws to escape the container sandbox, gain control of the node, and ultimately achieve a full cluster takeover.