/

CVE-2026-54523

Severity:

CRITICAL RISK

(9.6)

Improper Authorization (CWE-862) in Kyverno Policies

CVE-2026-54523

Deferred

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-862

Impact:

Cross-Namespace Resource Creation and Privilege Escalation

Severity:

CRITICAL RISK

(9.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical authorization flaw in Kyverno allows a namespace-scoped NamespacedMutatingPolicy to target resources in another namespace through the generator library. A user who can create such policies may cause the cluster-wide admission controller to create or modify resources across namespace boundaries, potentially enabling privilege escalation.

Affected context

The issue affects Kyverno deployments using NamespacedMutatingPolicy resources in the affected 1.18 release range. It becomes risky when a user can create or modify a namespace-scoped policy and the admission controller has cluster-wide permissions to generate resources. The vulnerability is present when policy compilation validates syntax and semantics without enforcing the policy's namespace boundary during generator execution.

Exploit preconditions

  • Attack surface: Kyverno policy creation and admission-controller processing
  • Required access: Permission to create a NamespacedMutatingPolicy in at least one namespace
  • Trigger point: Evaluation of the policy's CEL match conditions and generator operation
  • Authorization context: The admission controller operates with permissions broader than the policy author's namespace
  • Why exploitation is possible: Namespace scope is checked during compilation but is not enforced when the generator processes the target namespace

Why this happens

The vulnerability results from a mismatch between policy scope validation and runtime resource-generation authorization. The CEL compiler exposes generator functionality to match conditions, while validation confirms that the policy compiles without ensuring that generated resources remain within the policy namespace. The resource-generation path likewise accepts a cross-namespace target without rejecting it. This maps to CWE-862: Missing Authorization, because a namespace boundary is represented but not enforced when an operation is performed.

Potential impact

  • Unauthorized creation or modification of resources in other namespaces
  • Exposure or alteration of ConfigMaps, Secrets, and policy-related objects
  • Creation of NetworkPolicies that may weaken network isolation
  • Creation of RoleBindings that could grant additional permissions
  • Privilege escalation from namespace-level access toward broader cluster access
  • Disruption of workloads or security controls in unrelated namespaces

General mitigation guidance

Mitigation generally focuses on enforcing authorization boundaries at every policy execution and resource-generation layer.

Common defensive patterns include:

  • Restricting generator operations to the namespace associated with the policy
  • Rechecking target namespace authorization immediately before resource creation
  • Treating policy-declared namespaces as untrusted input rather than authoritative scope
  • Applying least-privilege permissions to admission controllers and generated-resource identities
  • Separating policy compilation from authorization decisions and validating both independently
  • Limiting which resource kinds a namespace-scoped policy may generate
  • Using admission and RBAC policies to prevent unauthorized cross-namespace resource creation

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis of policy compilers and generators for missing scope or ownership checks
  • Code review signals where namespace or tenant boundaries are validated only during parsing or compilation
  • Tests that attempt cross-namespace generation from namespace-scoped policy objects
  • Authorization-policy checks confirming that generated resource targets are independently validated
  • Audit-log monitoring for unusual resource creation by the Kyverno admission-controller identity
  • Alerts for namespace-scoped users creating RoleBindings, Secrets, NetworkPolicies, or other sensitive resources outside their namespace
  • Automated security review tools that identify unchecked user-controlled namespace parameters

Sources

SourceLink
github.comgithub.com/kyverno/kyverno/commit/0919553c0ea1904f8d891280c92018da97946a06
github.comgithub.com/kyverno/kyverno/commit/5164bcdeda5b57678bc2d7a03ecc2cbb02982dae
github.comgithub.com/kyverno/kyverno/pull/16238
github.comgithub.com/kyverno/kyverno/releases/tag/v1.18.2
github.comgithub.com/kyverno/kyverno/security/advisories/GHSA-79gf-7frw-68m9
github.comgithub.com/kyverno/sdk/commit/6573937441443e1ba5af9fbb28d5c0f20297f9df

Frequently asked

questions

It can be exploitable through the Kubernetes API when an attacker has network access to the cluster API and permission to create a NamespacedMutatingPolicy. The attacker does not necessarily need direct access to the target namespace.

The key prerequisite is permission to create or modify a qualifying namespace-scoped policy. The impact is amplified when Kyverno's admission controller has broad permissions to create resources across namespaces.

Enforce namespace authorization at the point where generated resources are created, and reject any target namespace outside the policy's permitted scope. Least-privilege controller permissions provide additional protection.

Test authorization boundaries independently from compilation, treat policy-controlled namespaces as untrusted input, monitor cross-namespace activity, and apply admission policies that restrict sensitive resource creation.

Find out what's already
exploitable in your codebase.