Skip to content
Threat Feed
critical advisory

Kyverno Unvalidated CEL Namespace Argument Vulnerability

A vulnerability in Kyverno v1.18.0 and v1.18.1 allows a namespace-scoped user to execute arbitrary resource creation across the entire cluster by exploiting an unvalidated namespace argument in CEL expressions.

CVE search metadata

CVE search record: CVE-2026-54523. Severity: critical. CVSS: 9.6. KEV: no. Product: Kyverno (v1.18.0, v1.18.1). Brief: Kyverno Unvalidated CEL Namespace Argument Vulnerability. Brief link: https://feed.craftedsignal.io/briefs/2026-08-kyverno-cel-vulnerability/

Kyverno versions v1.18.0 and v1.18.1 contain a critical security vulnerability (CVE-2026-54523) where the generator.apply() function, accessible via CEL (Common Expression Language) expressions in NamespacedMutatingPolicy, fails to validate the target namespace argument. This allows an attacker with sufficient permissions to create a NamespacedMutatingPolicy within their own namespace to force the Kyverno admission controller to generate resources - such as ConfigMaps, Secrets, or RoleBindings - in any other namespace, including highly sensitive ones like kube-system.

Because the admission controller executes these operations with cluster-wide privileges, an attacker can effectively bypass Kubernetes namespace isolation. The root cause is the lack of namespace scope enforcement in pkg/cel/policies/mpol/validate.go, leaving the generator.apply() function susceptible to cross-namespace resource injection during admission processing.

Attack Chain

  1. Attacker obtains create permissions on namespacedmutatingpolicies.policies.kyverno.io within a non-privileged namespace (e.g., tenant-ns).
  2. Attacker crafts a malicious NamespacedMutatingPolicy object targeting standard resources like ConfigMaps.
  3. Attacker inserts a matchConditions block containing a CEL expression that invokes generator.apply("target-namespace", [resources]).
  4. Attacker specifies a sensitive destination namespace (e.g., kube-system) as the first argument in the generator.apply function.
  5. Attacker creates a legitimate resource (e.g., a ConfigMap) in tenant-ns to trigger the Kyverno admission webhook.
  6. The admission controller parses the NamespacedMutatingPolicy and executes the generator.apply function at request time.
  7. The controller, operating with cluster-wide service account privileges, creates the attacker-defined resource in the target namespace.
  8. Final objective is achieved, such as injecting malicious configuration, disrupting network policy, or escalating privileges via unauthorized RoleBinding creation.

Impact

Successful exploitation allows for full namespace breakout and privilege escalation within the Kubernetes cluster. An attacker can inject unauthorized configuration into protected namespaces, modify network traffic flow via NetworkPolicies, or create elevated RoleBindings to gain persistent administrative access. Any Kubernetes cluster running Kyverno v1.18.0 or v1.18.1 that permits non-admin users to manage NamespacedMutatingPolicy resources is vulnerable to complete compromise.

Recommendation

  • Immediately upgrade Kyverno to a patched version that enforces namespace validation for the generator library.
  • Audit all existing NamespacedMutatingPolicy objects for matchConditions blocks containing generator.apply() calls.
  • Restrict RBAC permissions for creating NamespacedMutatingPolicy resources to highly trusted service accounts or cluster administrators until the patch is applied.
  • Implement Admission Controller logging to monitor for resource creation events originating from NamespacedMutatingPolicy triggers in sensitive namespaces.