Skip to main content
Vulnerability Database/CVE-2025-24784

CVE-2025-24784: Kubewarden Controller Information Disclosure

CVE-2025-24784 is an information disclosure flaw in kubewarden-controller that allows attackers to access cluster resources beyond their privileges through context-aware policies. This article covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-24784 Overview

CVE-2025-24784 affects kubewarden-controller, a Kubernetes controller that dynamically registers Kubewarden admission policies. The flaw resides in the AdmissionPolicyGroup custom resource introduced in release 1.17.0. The namespaced AdmissionPolicyGroup was designed to let non-admin users safely manage policies within their own namespaces. However, it incorrectly permitted the deployment of context-aware policies that query the Kubernetes API using the Policy Server's ServiceAccount token. This authorization gap [CWE-285] lets a namespaced user leverage the Policy Server's cluster-wide RBAC to read resources outside their reach. The issue is fixed in version 1.21.0.

Critical Impact

A low-privileged namespace user can create an AdmissionPolicyGroup with context-aware policies and read cluster-scoped resources such as Namespaces, Pods, Deployments, and Ingresses granted to the Policy Server's ServiceAccount.

Affected Products

  • kubewarden-controller versions 1.17.0 through 1.20.x
  • Kubewarden AdmissionPolicyGroup CRD (policies.kubewarden.io/v1)
  • Kubernetes clusters running Kubewarden Policy Server with context-aware RBAC permissions

Discovery Timeline

  • 2025-01-30 - CVE-2025-24784 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-24784

Vulnerability Analysis

Kubewarden supports two policy group CRDs: the cluster-scoped ClusterAdmissionPolicyGroup and the namespace-scoped AdmissionPolicyGroup. Cluster-scoped resources are reserved for administrators, while namespaced resources can be managed by tenants within their namespace. Context-aware policies can issue list and get requests against the Kubernetes API during evaluation. These queries execute under the Policy Server's ServiceAccount, which typically holds cluster-wide read access to Namespace, Pod, Deployment, and Ingress objects by default in the Helm chart. Because the namespaced AdmissionPolicyGroup incorrectly accepted contextAwareResources entries, a namespace tenant could craft a policy that returns cluster-wide data through the Policy Server's elevated token.

Root Cause

The root cause is improper authorization [CWE-285] in the AdmissionPolicyGroup type definition. The IsContextAware() method inspected member policies for ContextAwareResources and allowed context-aware behavior inside a namespaced CRD. The CRD schema also shared the same PolicyGroupSpec as its cluster-scoped counterpart, exposing context-aware fields to tenants who should not have them.

Attack Vector

An authenticated user with permission to create AdmissionPolicyGroup resources in a namespace crafts a policy group that declares contextAwareResources. When the Policy Server evaluates the policy, it uses its own ServiceAccount to query the Kubernetes API, returning cluster-scoped information to the attacker-controlled policy logic. The attacker exfiltrates this data via policy evaluation side effects such as webhook responses or policy logs.

go
// Security patch: api/policies/v1/admissionpolicygroup_types.go
func (r *AdmissionPolicyGroup) IsContextAware() bool {
-	for _, policy := range r.Spec.Policies {
-		if len(policy.ContextAwareResources) > 0 {
-			return true
-		}
-	}
+	// We return false here because AdmissionPolicyGroup have no access to context aware resources.
	return false
}

Source: kubewarden-controller commit 51a88df

The fix also splits the type hierarchy so only ClusterAdmissionPolicyGroup embeds the context-aware spec:

go
// Security patch: api/policies/v1/clusteradmissionpolicygroup_types.go
type ClusterPolicyGroupSpec struct {
	GroupSpec `json:""`

	// Policies is a list of policies that are part of the group that will
	// be available to be called in the evaluation expression field.
	// +kubebuilder:validation:Required
	Policies PolicyGroupMembersWithContext `json:"policies"`
}

type ClusterAdmissionPolicyGroupSpec struct {
	ClusterPolicyGroupSpec `json:""`
}

Source: kubewarden-controller commit 51a88df

Detection Methods for CVE-2025-24784

Indicators of Compromise

  • Creation of AdmissionPolicyGroup resources in tenant namespaces containing contextAwareResources entries.
  • Policy Server audit logs showing list or get API calls for cluster-scoped resources shortly after a namespaced policy group is applied.
  • Unexpected webhook responses or policy evaluation logs returning cluster-wide object metadata to tenant workloads.

Detection Strategies

  • Audit all policies.kubewarden.io/v1/AdmissionPolicyGroup objects for spec.policies[*].contextAwareResources fields; any such entries indicate exploit attempts prior to patching.
  • Review Kubernetes API server audit logs for requests from the Policy Server ServiceAccount correlated with recent AdmissionPolicyGroup admission events.
  • Compare installed kubewarden-controller versions against 1.21.0 across all clusters using kubectl -n kubewarden get deploy -o yaml.

Monitoring Recommendations

  • Alert on RBAC changes that expand the Policy Server ServiceAccount beyond Namespace, Pod, Deployment, and Ingress read access.
  • Monitor Kubewarden controller logs for policy group reconciliation events referencing context-aware configurations in namespaced resources.
  • Track creation of new AdmissionPolicyGroup CRDs by non-administrative service accounts and users.

How to Mitigate CVE-2025-24784

Immediate Actions Required

  • Upgrade kubewarden-controller to version 1.21.0 or later across all Kubernetes clusters.
  • Inventory existing AdmissionPolicyGroup resources and remove any that declare contextAwareResources.
  • Review and tighten the Policy Server ServiceAccount RBAC to the minimum required cluster-wide resources.

Patch Information

The vulnerability is fixed in kubewarden-controller 1.21.0 via commit 51a88df. The patch forces AdmissionPolicyGroup.IsContextAware() to return false and separates the type definitions so context-aware policy fields exist only on ClusterAdmissionPolicyGroup. See the GitHub Security Advisory GHSA-756x-m4mj-q96c for full advisory details.

Workarounds

  • Restrict RBAC so only cluster administrators can create or update AdmissionPolicyGroup resources until the controller is upgraded.
  • Reduce the Policy Server ServiceAccount permissions to the least privilege required, limiting the blast radius of context-aware queries.
  • Use an admission controller or OPA Gatekeeper policy to reject AdmissionPolicyGroup manifests containing contextAwareResources fields.
bash
# Upgrade Kubewarden to the patched release
helm repo update kubewarden
helm upgrade --install kubewarden-controller kubewarden/kubewarden-controller \
  --namespace kubewarden \
  --version 1.21.0

# Verify no namespaced policy groups declare context-aware resources
kubectl get admissionpolicygroups.policies.kubewarden.io -A \
  -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name}: {.spec.policies[*].contextAwareResources}{"\n"}{end}'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.