CVE-2025-24376: KubeWarden's AdmissionPolicy and AdmissionPolicyGroup policies can be used to alter PolicyReport resources
Impact By design, AdmissionPolicy and AdmissionPolicyGroup can evaluate only namespaced resources. The resources to be evaluated are determined by the rules provided by the user when defining the policy. There might be Kubernetes namespaced resources that should not be validated by AdmissionPolicy and by the AdmissionPolicyGroup policies because of their sensitive nature.
Published Jan 30, 2025 · Updated Feb 5, 2025
Affected packages
github.com/kubewarden/kubewarden-controller
- Ecosystem
- Go
- Affected
- >= 1.7.0, < 1.21.0
- Fixed in
- 1.21.0
- Check
go list -m github.com/kubewarden/kubewarden-controller
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
By design, AdmissionPolicy and AdmissionPolicyGroup can evaluate only namespaced resources. The resources to be evaluated are determined by the rules provided by the user when defining the policy. There might be Kubernetes namespaced resources that should not be validated by AdmissionPolicy and by the AdmissionPolicyGroup policies because of their sensitive nature. For example, PolicyReport are namespaced resources that contain the list of non compliant objects found inside of a namespace. See this section of Kubewarden’s documentation for more details about PolicyReport resources. An attacker can use either an AdmissionPolicy or an AdmissionPolicyGroup to prevent the creation and update of PolicyReport objects to hide non-compliant resources. Moreover, the same attacker might use a mutating AdmissionPolicy to alter the contents of the PolicyReport created inside of the namespace.
Patches
Starting from the 1.21.0 release, the validation rules applied to AdmissionPolicy and AdmissionPolicyGroup have been tightened to prevent them from validating sensitive types of namespaced resources. The new validation will also restrict the usage of wildcards when defining apiGroups and resources rules for AdmissionPolicy and AdmissionPolicyGroup objects.
Workarounds
On clusters running Kubewarden < 1.21.0, the following Kubewarden policy can be applied to prevent the creation of AdmissionPolicy and AdmissionPolicyGroup resources that interact with PolicyReport resources:
apiVersion: policies.kubewarden.io/v1
kind: ClusterAdmissionPolicy
metadata:
name: "deny-interaction-with-policyreport"
spec:
module: registry://ghcr.io/kubewarden/policies/cel-policy:latest
settings:
variables:
- name: hasWildcardInsideOfApiGroup
expression: "object.spec.rules.exists(r, r.apiGroups.exists(ag, ag == '*'))"
- name: hasWildcardInsideOfResources
expression: "object.spec.rules.exists(r, r.resources.exists(ag, ag == '*' || ag == '*/*' || ag == 'policyreports/*'))"
- name: dealsWithPolicyReportApiGroup
expression: "object.spec.rules.exists(r, r.apiGroups.exists(ag, ag == 'wgpolicyk8s.io'))"
- name: dealsWithPolicyReportResource
expression: "object.spec.rules.exists(r, r.resources.exists(ag, ag == 'policyreports' || ag == 'policyreports/'))"
- name: isPendingDeletion
expression: "has(object.metadata.deletionTimestamp)"
validations:
- expression: |
!( variables.hasWildcardInsideOfApiGroup ||
variables.hasWildcardInsideOfResources ||
variables.dealsWithPolicyReportResource ||
variables.dealsWithPolicyReportApiGroup
) || variables.isPendingDeletion
message: "cannot target PolicyReport resources or use wildcards in apiGroups or resources"
rules:
- apiGroups: ["policies.kubewarden.io"]
apiVersions: ["v1"]
operations: ["CREATE", "UPDATE"]
resources: ["admissionpolicies", "admissionpolicygroups"]
mutating: false
backgroundAudit: trueFor more information
If you have any questions or comments about this advisory you can contact the Kubewarden team using the procedures described under the “security disclosure“ guidelines of the Kubewarden project.
Credited to flavio.
References
- https://github.com/kubewarden/kubewarden-controller/security/advisories/GHSA-fc89-jghx-8pvg
- https://nvd.nist.gov/vuln/detail/CVE-2025-24376
- https://github.com/kubewarden/kubewarden-controller/commit/8124039b5f0c955d0ee8c8ca12d4415282f02d2c
- https://pkg.go.dev/vuln/GO-2025-3434
- https://github.com/advisories/GHSA-fc89-jghx-8pvg
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-42541
Kubewarden vulnerable to RBAC Reconnaissance via unchecked can_i host capability call
medium4.3May 5, 2026CVE-2026-29773
Kubewarden: Cross-namespace data exfiltration via deprecated host callback binding
medium4.3Mar 9, 2026CVE-2025-24784
Kubewarden-Controller information leak via AdmissionPolicyGroup Resource
medium4.3Jan 30, 2025
