Summary
OpenFunction can allow namespace tenants with permission to create Function or Serving resources to supply PodSpec templates containing privileged host-access settings. If those settings are not restricted, an attacker may gain access to the worker node, including its root filesystem.
Affected context
The risk concerns OpenFunction deployments where Function or Serving resources accept tenant-controlled PodSpec templates without adequate authorization or security-policy enforcement. It becomes significant when tenants can create those resources and the resulting pods are allowed to use settings such as privileged mode, host namespaces, or hostPath mounts.
Exploit preconditions
- Attack surface: Function and Serving resource creation in an OpenFunction deployment
- Required access: Permission to create one of those resource types in a namespace
- Trigger point: The controller processes a tenant-supplied PodSpec template
- Why exploitation is possible: Pod security-sensitive fields may be accepted without sufficient authorization or policy checks, potentially granting access to host resources
Why this happens
The underlying issue is insufficient authorization and enforcement around security-sensitive fields in user-supplied pod templates. This maps to CWE-862: Missing Authorization: the system does not adequately restrict which tenants may request host-level privileges or ensure those requests comply with deployment policy. Accepting privileged settings such as hostPath, hostPID, or hostNetwork without appropriate controls can cross the intended namespace isolation boundary.
Potential impact
- A tenant could gain access to the worker node's root filesystem
- A compromised pod may be able to access host processes or network resources
- An attacker may escalate from namespace-level access to node-level control
- Node compromise could enable lateral movement or affect workloads sharing the node
General mitigation guidance
Mitigation generally focuses on restricting security-sensitive pod configuration and enforcing authorization at the point resources are accepted and deployed.
Common defensive patterns include:
- Rejecting privileged containers and host-level settings by default
- Applying admission policies that allow only explicitly approved PodSpec fields and values
- Limiting Function and Serving creation permissions to trusted principals
- Running workloads with least privilege and isolating tenants across appropriate boundaries
- Avoiding hostPath mounts and host namespace access unless a narrowly scoped operational need is established
How teams detect issues like this
High-level detection can include:
- Reviewing controller and admission-policy code for unrestricted propagation of tenant-supplied PodSpec fields
- Scanning resource definitions and deployed pods for privileged mode, hostNetwork, hostPID, or hostPath settings
- Auditing namespace role bindings for principals that can create Function or Serving resources
- Enforcing policy checks that deny unapproved host-access settings and alert on attempted violations
Static analysis and automated configuration review can help identify risky template handling and policy gaps.

