Summary
A pod security bypass in Fission's Environment CRD allowed user-specified pod specs to propagate sensitive fields like host networking, PID/IPC sharing, privileged containers, and service accounts into runtime and builder pods without validation.
When untrusted or semi-trusted users can define or influence Environment resources, this flaw can lead to privilege escalation and broad cluster compromise by escaping intended pod security boundaries.
Affected context
This issue affects Fission deployments where:
- The Environment CustomResourceDefinition (CRD) is exposed to users or tenants, directly or via higher-level automation
- spec.runtime.podSpec and spec.builder.podSpec are accepted from user or application inputs
- The platform relies on Kubernetes pod security controls (e.g., hostNetwork, hostPID, hostIPC, privileged, serviceAccountName) to enforce isolation
In such contexts, the merge logic treated these podSpec fields as trusted and applied them directly to runtime and builder pods.
Exploit preconditions
- Attack surface: Kubernetes API paths that create or update Fission Environment objects, including any UI, CLI, or automation fronting them.
- Required access: Ability to submit or modify Environment CRDs (or any configuration that maps directly into spec.runtime.podSpec or spec.builder.podSpec).
- Trigger point: Creation or update of an Environment that includes dangerous podSpec attributes, followed by deployment or invocation of functions using that Environment.
- Why exploitation is possible: The merge logic blindly propagated hostNetwork, hostPID, hostIPC, container privileged, and serviceAccountName from user-controlled podSpec into the final pod template, and Environment.Validate did not perform security checks on these fields, effectively bypassing upstream pod security assumptions.
Why this happens
The core problem is an authorization and validation gap around sensitive pod-level security attributes.
Fission's Environment controller merged user-supplied podSpec fragments into runtime and builder pod specs without filtering or enforcing policy on high-privilege fields such as host networking, PID/IPC namespace sharing, privileged containers, and service account selection.
This maps primarily to CWE-284: Improper Access Control and CWE-269: Improper Privilege Management, where untrusted configuration is allowed to alter the effective privileges and isolation of workload pods.
Additionally, the absence of checks in Environment.Validate reflects a CWE-693: Protection Mechanism Failure, as security-relevant mechanisms (pod security boundaries) are not consistently enforced at the application layer.
Potential impact
- Attackers may run function workloads in privileged containers with host-level capabilities.
- Malicious pods could attach to hostNetwork and hostPID/hostIPC, potentially snooping or interfering with node-level processes.
- Compromise or misuse of Kubernetes service accounts that grant elevated permissions within the cluster.
- Lateral movement across namespaces or workloads by abusing privileged pod contexts.
- Escalation from a constrained Fission user role to broader Kubernetes cluster control, including data exfiltration or destructive actions.
General mitigation guidance
Effective mitigation focuses on tightening the trust boundary around pod specifications and enforcing least privilege by design:
- Introduce explicit allowlists or denylists for security-sensitive podSpec fields (e.g., disallow hostNetwork, hostPID, hostIPC, privileged, and arbitrary serviceAccountName by default).
- Centralize pod security policy within the control plane, ensuring that user-provided configuration cannot directly modify isolation-related attributes.
- Design Fission Environments so that common needs (e.g., resource limits, environment variables) are configurable, while high-risk fields remain fixed and controlled by cluster administrators.
- Apply the principle of least privilege to any service accounts used by Fission-managed pods, separating roles for build, runtime, and control-plane components.
- Combine application-level checks with Kubernetes-native protections (e.g., Pod Security admission, admission controllers) to reject workloads that request overly privileged settings.
How teams detect issues like this
To detect and monitor for similar issues, organizations can:
- Use static analysis and configuration scanning to flag code paths where user-controlled CRD fields are merged into pod specs without filtering or policy checks.
- During code review, look for controller logic that passes through podSpec fragments from CRDs or custom APIs directly into PodTemplates, especially around host namespaces, privileged flags, and serviceAccountName.
- Deploy admission control policies (e.g., validating admission webhooks, Pod Security admission) that log and optionally block pod creations requesting hostNetwork, hostPID/IPC, or privileged containers from Fission-managed namespaces.
- Monitor audit logs for Environments or pods that specify high-privilege options, correlating them with user identities and automated systems.
- Employ configuration and policy-as-code tools to enforce organizational standards on all serverless and CRD-driven workload definitions.

