The vulnerability, GHSA-m63v-2g9w-2w6v, exists in Fission due to a missing security validation for standalone container definitions within the Environment Custom Resource Definition (CRD). The Environment CRD allows specifying spec.runtime.container and spec.builder.container, which are merged into the final pod definitions for functions and builds.
The root cause is a two-fold failure:
- Admission Control Bypass: The
v1.Environment.Validate function, which is called by the admission webhook, did not validate the securityContext of these standalone container fields. It only checked PodSpec objects, which these fields are not part of. This allowed malicious Environment resources with privileged settings (e.g., privileged: true) to be accepted by the Kubernetes API server.
- Merge Layer Bypass: The
util.MergeContainer function, used by internal components to construct pods, merged these container definitions without sanitizing the securityContext. This meant that even if admission webhooks were not strictly enforced, the dangerous settings would still propagate to the final running pod.
Exploitation of this vulnerability allows a user with RBAC permissions to create or update Environment resources to create pods with elevated privileges, effectively escaping the container sandbox and potentially compromising the underlying node and the entire Kubernetes cluster. The patch addresses this by adding explicit validation in v1.Environment.Validate and defense-in-depth sanitization in util.MergeContainer.