/

CVE-2026-122304

Severity:

CRITICAL RISK

(9.9)

Authorization Bypass (CWE-863) in Kyverno Cleanup Controller

CVE-2026-122304

Undergoing Analysis

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-863

Impact:

Cross-namespace data disclosure and unauthorized modification of cluster-wide security configuration

Severity:

CRITICAL RISK

(9.9)

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

Kyverno's cleanup controller can process a namespaced CleanupPolicy with context entries that bypass namespace confinement. A namespace administrator may use this behavior to read Secrets in other namespaces or modify validating webhook configurations through the controller's ServiceAccount.

Kyverno's cleanup controller can process a namespaced CleanupPolicy with context entries that bypass namespace confinement. A namespace administrator may use this behavior to read Secrets in other namespaces or modify validating webhook configurations through the controller's ServiceAccount.

Affected context

The issue affects Kyverno cleanup-controller deployments in the stated release range when the controller builds its context loader with a nil policy. A namespaced CleanupPolicy containing apiCall or globalReference context entries may then be evaluated without the intended namespace authorization checks.

The issue affects Kyverno cleanup-controller deployments in the stated release range when the controller builds its context loader with a nil policy. A namespaced CleanupPolicy containing apiCall or globalReference context entries may then be evaluated without the intended namespace authorization checks.

Exploit preconditions

  • Attack surface: Kyverno's cleanup-policy processing
  • Required access: Ability to create a namespaced CleanupPolicy, such as namespace-admin access
  • Trigger point: The cleanup controller evaluates the policy's context entries
  • Why exploitation is possible: A nil policy in the context loader can cause authorization checks to be bypassed, allowing operations under the cleanup controller's ServiceAccount beyond the namespace boundary
  • Attack surface: Kyverno's cleanup-policy processing
  • Required access: Ability to create a namespaced CleanupPolicy, such as namespace-admin access
  • Trigger point: The cleanup controller evaluates the policy's context entries
  • Why exploitation is possible: A nil policy in the context loader can cause authorization checks to be bypassed, allowing operations under the cleanup controller's ServiceAccount beyond the namespace boundary

Why this happens

The cleanup controller constructs a context loader without the policy information needed to enforce the intended authorization scope. As a result, context entries such as apiCall or globalReference may be processed without adequate authorization checks. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization: access is granted without correctly verifying whether the requesting policy is permitted to perform the operation.

The cleanup controller constructs a context loader without the policy information needed to enforce the intended authorization scope. As a result, context entries such as apiCall or globalReference may be processed without adequate authorization checks. This is an authorization enforcement failure mapped to CWE-863: Incorrect Authorization: access is granted without correctly verifying whether the requesting policy is permitted to perform the operation.

Potential impact

  • A namespace administrator may be able to read Secrets from other namespaces.
  • An attacker could modify validating webhook configurations using the cleanup controller's ServiceAccount.
  • Security controls enforced by validating webhooks could be weakened or disrupted.
  • The controller's permissions could enable further unauthorized actions, depending on its configuration.
  • A namespace administrator may be able to read Secrets from other namespaces.
  • An attacker could modify validating webhook configurations using the cleanup controller's ServiceAccount.
  • Security controls enforced by validating webhooks could be weakened or disrupted.
  • The controller's permissions could enable further unauthorized actions, depending on its configuration.

General mitigation guidance

Defensive approaches include ensuring authorization decisions are made with the correct policy and namespace context before resolving references or performing API calls. Restrict context features to explicitly authorized resources, apply least-privilege permissions to controller ServiceAccounts, and limit who can create or modify cleanup policies. Where possible, prefer secure-by-default configuration and reduce reliance on user-controlled references or inputs.

Defensive approaches include ensuring authorization decisions are made with the correct policy and namespace context before resolving references or performing API calls. Restrict context features to explicitly authorized resources, apply least-privilege permissions to controller ServiceAccounts, and limit who can create or modify cleanup policies. Where possible, prefer secure-by-default configuration and reduce reliance on user-controlled references or inputs.

How teams detect issues like this

Review cleanup-controller code and configuration for context loaders created without policy or namespace authorization context. Use static analysis and code review to identify API calls or reference resolution that occur before access checks. Monitor policy creation and changes, cross-namespace Secret access, and modifications to validating webhook configurations; enforce admission policies that restrict these operations to trusted identities.

Review cleanup-controller code and configuration for context loaders created without policy or namespace authorization context. Use static analysis and code review to identify API calls or reference resolution that occur before access checks. Monitor policy creation and changes, cross-namespace Secret access, and modifications to validating webhook configurations; enforce admission policies that restrict these operations to trusted identities.

Sources

SourceLink
github.comgithub.com/kyverno/kyverno/security/advisories/GHSA-p58h-r4j3-h5vx
github.comgithub.com/kyverno/kyverno/security/advisories/GHSA-rcxg-3f92-3mgr
vulncheck.comvulncheck.com/advisories/kyverno-1.17.0-before-1.19.2-privilege-escalation-via-cleanuppolicy-context-loader

Frequently asked

questions

It concerns Kyverno's cleanup controller and policies whose context entries can trigger operations outside their intended namespace.

The described attack requires the ability to create a namespaced CleanupPolicy, such as access held by a namespace administrator.

Ensure authorization checks use the correct policy and namespace context before resolving references or making API calls, and limit the controller's permissions.

Enforce authorization at each operation boundary, restrict cross-namespace references by default, and audit policy changes and sensitive controller actions.

It concerns Kyverno's cleanup controller and policies whose context entries can trigger operations outside their intended namespace.

The described attack requires the ability to create a namespaced CleanupPolicy, such as access held by a namespace administrator.

Ensure authorization checks use the correct policy and namespace context before resolving references or making API calls, and limit the controller's permissions.

Enforce authorization at each operation boundary, restrict cross-namespace references by default, and audit policy changes and sensitive controller actions.

Find out what's already
exploitable in your codebase.