Summary
Kyverno's CEL policy compiler registers several libraries for policy authors. For namespaced policy types (which tenants can author in their own namespace), each library that can reach data outside the policy's namespace is passed the policy namespace as a confinement argument. globalcontext.Lib is the one exception: it is registered without a namespace or any derivative of one, meaning it performs no tenant-namespace scoping. A tenant with NamespacedValidatingPolicy create permissions in their own namespace can call globalContext.get("<entry>", "") and receive the full cached contents of any cluster-scoped GlobalContextEntry — including data pulled from namespaces the tenant has no RBAC permission to read. The same unconfined registration also appears in the mpol, dpol, gpol, background-controller, and image-verification evaluator compilers.
Impact
A tenant authorized only in their own namespace can read sensitive data cached in GlobalContextEntry resources from any namespace in the cluster. GlobalContextEntry is cluster-scoped by design and is used to cache data retrieved from external APIs or Kubernetes resources across all namespaces. Depending on what administrators have configured as GlobalContextEntry data sources, an exploiting tenant could read secrets, configuration, or other sensitive state from namespaces they do not control. The three previously fixed advisories for this same pattern (GHSA-8p9x-46gm-qfx2, GHSA-cvq5-hhx3-f99p, GHSA-rggm-jjmc-3394) confirm the severity and exploitability of namespace confinement gaps in Kyverno's CEL library registration.
Detection
Enumerate all NamespacedValidatingPolicy (and sibling NamespacedMutatingPolicy, NamespacedDeletingPolicy, NamespacedGeneratingPolicy, NamespacedImageValidatingPolicy) resources in the cluster and search their CEL expressions for calls to globalContext.get(). On unpatched versions (1.16.0 through 1.18.x), any such call succeeds without namespace restriction. Review Kyverno audit logs for unusual policy evaluation patterns that correlate with globalContext.get() calls from namespaced policies authored by non-administrative tenants.
Mitigation
Upgrade to Kyverno 1.19.1, which passes the policy's namespace to globalcontext.Lib at registration time — matching the confinement already applied to resource.Lib and http.Lib. Until the upgrade is complete, restrict creation and update of NamespacedValidatingPolicy and sibling namespaced policy types to trusted administrators using RBAC, removing the ability for unprivileged tenants to author policies that call globalContext.get().