Description

A critical security vulnerability in Kyverno, a widely used Kubernetes policy engine, has been identified that completely undermines namespace isolation within affected clusters. The flaw allows authenticated users with permission to create namespaced Kyverno policies to escalate their privileges and effectively gain cluster-admin–level access. Due to the severity and ease of exploitation, the issue has been assigned a CVSS score of 10.0, indicating maximum criticality. Exploitation could allow attackers to read sensitive secrets, modify cluster-wide configurations, create privileged resources, or take full control of the Kubernetes environment. Organizations using Kyverno for policy enforcement are at significant risk if the vulnerability remains unpatched. The vulnerability stems from improper authorization enforcement in Kyverno’s apiCall feature, which enables policies to interact with the Kubernetes API. Under normal conditions, namespaced Kyverno policies should be strictly limited to resources within their own namespace. However, due to flawed validation logic, Kyverno fails to enforce these boundaries when resolving API requests defined in policies. When a policy uses apiCall, Kyverno executes the request using the Kyverno admission controller’s ServiceAccount rather than the permissions of the policy author. In many deployments, this ServiceAccount is granted broad or near-administrative privileges to function correctly. An attacker can abuse this behavior by crafting a malicious namespaced policy that dynamically injects arbitrary API paths into the urlPath field using context variables. Because Kyverno does not adequately verify whether the requested API endpoint remains within the policy’s namespace, the crafted policy can access cluster-scoped resources or other namespaces. This enables attackers to read secrets, create or modify ClusterRoles and ClusterRoleBindings, deploy cluster-wide policies, or manipulate critical Kubernetes objects. In addition to privilege escalation, a related high-severity issue allows attackers to create policies that trigger excessive memory consumption, leading to Kyverno crashes and denial of service. Together, these flaws can result in full cluster compromise, loss of enforcement controls, and widespread security exposure if not addressed promptly.