Summary
Fission's Function admission webhook previously failed to verify that a function's referenced environment belonged to the same namespace as the function itself.
Under these conditions, an attacker could bind a function to an environment in another namespace, potentially bypassing intended isolation and access controls in multi-tenant Kubernetes clusters.
Affected context
This vulnerability affects Fission deployments where multiple namespaces are used to separate tenants, teams, or environments, and where Fission Functions reference shared or privileged environments.
It is most relevant when:
- Functions are created via the Fission API, CLI, or other automated pipelines
- Admission webhooks are relied upon to enforce namespace-level isolation
- Environments in certain namespaces have elevated permissions or access to sensitive resources
In such setups, a missing namespace equality check on spec.environment.namespace weakens the intended security boundary between namespaces.
Exploit preconditions
- Attack surface: Fission Function creation or update operations exposed via the Kubernetes API (e.g., through
kubectl, Fission CLI, or controllers). - Required access: Ability to create or modify Fission Function resources in at least one namespace (typically authenticated but potentially low-privileged users or service accounts).
- Trigger point: Submitting or updating a Function spec where
spec.environment.namespacepoints to an Environment in a different, potentially more privileged, namespace. - Why exploitation is possible: The admission webhook verifies namespaces for secrets and configmaps but omits a corresponding check for the referenced environment. As a result, a crafted Function spec can bind to an out-of-namespace environment without being rejected by the webhook.
Why this happens
The root cause is incomplete authorization and input validation logic in the Function admission webhook.
While the webhook enforces that spec.secrets[].namespace and spec.configmaps[].namespace match the Function's namespace, it does not perform the same check on spec.environment.namespace. This inconsistency creates a policy gap where one type of referenced resource (environments) is exempt from the intended namespace isolation rules.
Conceptually, this maps to CWE-284: Improper Access Control and CWE-863: Incorrect Authorization, where authorization checks are present but incomplete, allowing resources to be associated across security boundaries in ways that were not intended by the system's isolation model.
Potential impact
- Functions may be bound to environments residing in more privileged namespaces.
- An attacker could leverage a shared or privileged environment to gain access to resources (e.g., credentials, APIs, data stores) not intended for their namespace.
- Cross-namespace information disclosure may occur if environment configuration or runtime access spans multiple tenants.
- Lateral movement within a Kubernetes cluster could be facilitated through misused environments with broader permissions.
- Defense-in-depth assumptions around namespace-based multi-tenancy can be weakened, complicating incident containment.
General mitigation guidance
Effective mitigation focuses on consistently enforcing namespace isolation and tightening authorization around referenced resources:
- Align admission policies so that all referenced objects in a Function spec (secrets, configmaps, environments, etc.) must reside in the same namespace as the Function, unless explicitly designed otherwise.
- Apply a default-deny approach for cross-namespace references, with narrowly scoped, auditable exceptions where cross-namespace sharing is truly required.
- Restrict who can create or update Fission Environments and Functions, using fine-grained Kubernetes RBAC to separate roles that manage environments from roles that deploy functions.
- Design environments with least-privilege principles: avoid bundling excessive permissions or broad cluster access into shared environments.
- Use clear multi-tenant boundaries, such as per-tenant namespaces and per-namespace environments, to reduce the blast radius of any misconfiguration or bypass.
How teams detect issues like this
Detection should aim to identify inconsistent namespace references and anomalous bindings between functions and environments:
- Implement configuration or policy checks (e.g., using admission controllers or policy engines like OPA/Gatekeeper or Kyverno) that flag or deny Functions whose
spec.environment.namespacediffers from the Function's namespace, unless an explicit policy allows it. - Use static configuration analysis in CI pipelines to scan Kubernetes manifests and Fission specs for cross-namespace references to Environments, especially those in high-privilege namespaces.
- During code and configuration review, treat any cross-namespace environment usage as a security-sensitive pattern that requires justification and documented controls.
- Periodically audit the cluster for existing Function-to-Environment mappings, generating reports of Functions that reference environments outside their own namespace for manual review.

