Summary
The Kyverno cleanup controller constructs its context loader by passing nil in place of the policy object (ctxFactory(nil, kyvernov1.Rule{})), causing policyNamespace to be set to an empty string. This makes the apiCall URL-path namespace clamp (added for CVE-2026-22039) and the globalReference denial (added for a related fix) inert by construction. A namespaced CleanupPolicy therefore receives none of the namespace confinement that an equivalent namespaced Policy would receive, even though the cleanup controller is enabled by default and the chart grants create cleanuppolicies to every namespace admin.
Impact
A user who can create a CleanupPolicy in any namespace can embed context entries using apiCall or globalReference that reach arbitrary namespaces and global context entries, effectively bypassing the namespace isolation guarantees introduced by the CVE-2026-22039 and related fixes. Because the background controller's privileged ServiceAccount executes the context lookups, the tenant's own RBAC in the victim namespace is not consulted. This enables a namespace-scoped actor to read cross-namespace Kubernetes resources and global context entries, and depending on the context payload, to escalate privileges cluster-wide.
Detection
Audit all CleanupPolicy resources in your cluster for spec.context entries that use apiCall or globalReference. In an unpatched cluster running Kyverno versions 1.17.0 through 1.19.1, any such entries execute without namespace confinement. The Kyverno admission webhook does not block apiCall or globalReference context entries in CleanupPolicy admission, so no admission-time signal exists.
Mitigation
Upgrade Kyverno to version 1.19.2 or later, which passes the correct policy object to the context loader factory and restores namespace confinement for CleanupPolicy context entries. Until an upgrade is possible, restrict create and update permissions on cleanuppolicies.kyverno.io to trusted administrators only, removing the default namespace-admin grant where feasible.
Related Security Guidance
References
- GHSA-p58h-r4j3-h5vx — Kyverno cleanup controller context escape — GitHub Security Advisory