/

CVE-2026-122313

Severity:

CRITICAL RISK

(9.9)

Privilege Escalation (CWE-269) in Kyverno Policies

CVE-2026-122313

Undergoing Analysis

Vulnerability type

Category:

Privilege Escalation

CWE:

CWE-269

Impact:

Unauthorized cross-namespace resource modification

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

A privilege escalation flaw in Kyverno's NamespacedMutatingPolicy handling can let a namespace-scoped tenant cause resources in other namespaces to be modified. The risk arises when a policy's CEL output selects a target without adequate namespace checks and the cluster-wide background controller processes that target.

A privilege escalation flaw in Kyverno's NamespacedMutatingPolicy handling can let a namespace-scoped tenant cause resources in other namespaces to be modified. The risk arises when a policy's CEL output selects a target without adequate namespace checks and the cluster-wide background controller processes that target.

Affected context

The vulnerability affects Kyverno deployments using NamespacedMutatingPolicy with targetMatchConstraints.expression. It becomes risky when the expression can produce a target outside the policy's namespace and the background controller applies mutations without adequately restricting that target.

The vulnerability affects Kyverno deployments using NamespacedMutatingPolicy with targetMatchConstraints.expression. It becomes risky when the expression can produce a target outside the policy's namespace and the background controller applies mutations without adequately restricting that target.

Exploit preconditions

  • Attack surface: NamespacedMutatingPolicy evaluation and mutation by the cluster-wide background controller
  • Required access: Ability to create or modify a NamespacedMutatingPolicy in a tenant-accessible namespace
  • Trigger point: The controller evaluates the policy and processes its CEL-produced target
  • Why exploitation is possible: The target expression can lack namespace checks, allowing a target in another namespace to be selected for mutation
  • Attack surface: NamespacedMutatingPolicy evaluation and mutation by the cluster-wide background controller
  • Required access: Ability to create or modify a NamespacedMutatingPolicy in a tenant-accessible namespace
  • Trigger point: The controller evaluates the policy and processes its CEL-produced target
  • Why exploitation is possible: The target expression can lack namespace checks, allowing a target in another namespace to be selected for mutation

Why this happens

The underlying issue is insufficient authorization and scope enforcement when policy output determines which resources a privileged controller mutates. If a NamespacedMutatingPolicy's CEL expression can select targets without verifying that they are within the policy's permitted namespace, a namespace-scoped tenant may influence a cluster-wide controller to act beyond that tenant's authority. This maps to CWE-269: Improper Privilege Management.

The underlying issue is insufficient authorization and scope enforcement when policy output determines which resources a privileged controller mutates. If a NamespacedMutatingPolicy's CEL expression can select targets without verifying that they are within the policy's permitted namespace, a namespace-scoped tenant may influence a cluster-wide controller to act beyond that tenant's authority. This maps to CWE-269: Improper Privilege Management.

Potential impact

  • An attacker could add subjects to another namespace's RoleBinding or alter its role assignments.
  • An attacker may modify NetworkPolicies or ConfigMaps in namespaces they do not control.
  • Cross-namespace changes could weaken access controls or disrupt workloads.
  • The incident could enable further unauthorized access, depending on the affected resources and cluster configuration.
  • An attacker could add subjects to another namespace's RoleBinding or alter its role assignments.
  • An attacker may modify NetworkPolicies or ConfigMaps in namespaces they do not control.
  • Cross-namespace changes could weaken access controls or disrupt workloads.
  • The incident could enable further unauthorized access, depending on the affected resources and cluster configuration.

General mitigation guidance

Defensive patterns focus on ensuring that policy scope cannot exceed the author's authority:

  • Enforce namespace boundaries on every resolved target, independently of CEL output.
  • Prefer target selection that is constrained by trusted policy context and explicit namespace allowlists.
  • Validate policy expressions and their possible outputs before a privileged controller applies mutations.
  • Ensure the controller checks authorization for each target and mutation rather than relying only on policy creation permissions.
  • Apply least privilege to controller identities and limit tenant permissions to create or modify policies.

Defensive patterns focus on ensuring that policy scope cannot exceed the author's authority:

  • Enforce namespace boundaries on every resolved target, independently of CEL output.
  • Prefer target selection that is constrained by trusted policy context and explicit namespace allowlists.
  • Validate policy expressions and their possible outputs before a privileged controller applies mutations.
  • Ensure the controller checks authorization for each target and mutation rather than relying only on policy creation permissions.
  • Apply least privilege to controller identities and limit tenant permissions to create or modify policies.

How teams detect issues like this

  • Review policy evaluation paths for CEL-derived targets that are not checked against the policy namespace or an explicit allowlist.
  • Use static analysis and code review to identify privileged controllers that trust tenant-controlled policy output when selecting resources.
  • Audit NamespacedMutatingPolicy definitions and controller logs for cross-namespace target selection or unexpected mutations.
  • Enforce admission policies that restrict target namespaces and require explicit authorization for cross-namespace effects.
  • Automated code review tools can help flag missing scope checks in policy and controller logic.
  • Review policy evaluation paths for CEL-derived targets that are not checked against the policy namespace or an explicit allowlist.
  • Use static analysis and code review to identify privileged controllers that trust tenant-controlled policy output when selecting resources.
  • Audit NamespacedMutatingPolicy definitions and controller logs for cross-namespace target selection or unexpected mutations.
  • Enforce admission policies that restrict target namespaces and require explicit authorization for cross-namespace effects.
  • Automated code review tools can help flag missing scope checks in policy and controller logic.

Sources

SourceLink
github.comgithub.com/kyverno/kyverno/security/advisories/GHSA-f96w-622v-rqpq
vulncheck.comvulncheck.com/advisories/kyverno-1.17.0-before-1.19.2-cross-namespace-privilege-escalation-via-namespacedmutatingpolicy

Frequently asked

questions

It concerns cross-namespace mutations made through NamespacedMutatingPolicy targets processed by Kyverno's background controller.

The described attack requires the ability to create or modify a relevant NamespacedMutatingPolicy in a namespace the attacker can access.

Enforce namespace and authorization checks on every resolved target before a privileged controller applies a mutation.

Treat policy output as untrusted, constrain targets to the policy's authorized scope, and review controller permissions and cross-namespace operations.

It concerns cross-namespace mutations made through NamespacedMutatingPolicy targets processed by Kyverno's background controller.

The described attack requires the ability to create or modify a relevant NamespacedMutatingPolicy in a namespace the attacker can access.

Enforce namespace and authorization checks on every resolved target before a privileged controller applies a mutation.

Treat policy output as untrusted, constrain targets to the policy's authorized scope, and review controller permissions and cross-namespace operations.

Find out what's already
exploitable in your codebase.