CVE-2025-24376: Github.com/kubewarden/kubewarden controller Remote Code Execution Vulnerability
MODERATECVE-2025-24376 is a MODERATE (CVSS 6.5) remote code execution vulnerability (CWE-155: Improper Neutralization of Wildcards or Matching Symbols) affecting Github.com/kubewarden/kubewarden controller libraries in the Go ecosystem. The issue involves kubewarden's admissionpolicy and admissionpolicygroup policies can be used to alter policyreport resources. Remediation is available by upgrading affected packages to version 1.21.0.
CVE-2025-24376 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).
How to Fix CVE-2025-24376
To remediate this vulnerability, upgrade all affected Github.com/kubewarden/kubewarden controller dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/kubewarden/kubewarden-controller to 1.21.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/kubewarden/kubewarden-controller
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-24376, inspect your project dependencies for Github.com/kubewarden/kubewarden controller:
inspect dependencies for github.com/kubewarden/kubewarden-controller
Analyze the terminal output to locate any version of Github.com/kubewarden/kubewarden controller in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.21.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-155: Improper Neutralization of Wildcards or Matching Symbols, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as wildcards or matching symbols when they are sent to a downstream component. In Github.com/kubewarden/kubewarden controller, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-24376 Affected Github.com/kubewarden/kubewarden controller Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/kubewarden/kubewarden-controller
|
Go |
≥ 1.7.0
< 1.21.0
|
1.21.0
|
References
Frequently Asked Questions
What is CVE-2025-24376?
Which Github.com/kubewarden/kubewarden controller versions are affected?
What version fixes CVE-2025-24376?
Is github.com/kubewarden/kubewarden-controller affected?
What is the CVSS score of CVE-2025-24376?
What CWE is associated with CVE-2025-24376?
How can I check Go dependencies for CVE-2025-24376?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fc89-jghx-8pvg",
"modified" : "2025-02-05T16:23:59Z",
"published" : "2025-01-30T17:52:37Z",
"aliases" : [ "CVE-2025-24376" ],
"summary" : "KubeWarden's AdmissionPolicy and AdmissionPolicyGroup policies can be used to alter PolicyReport resources",
"details" : "### Impact\n\nBy 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.\nThere might be Kubernetes namespaced resources that should not be validated by AdmissionPolicy and by the AdmissionPolicyGroup policies because of their sensitive nature.\nFor example, PolicyReport are namespaced resources that contain the list of non compliant objects found inside of a namespace. See [this section](https://docs.kubewarden.io/explanations/audit-scanner/policy-reports) of Kubewarden’s documentation for more details about PolicyReport resources.\nAn attacker can use either an AdmissionPolicy or an AdmissionPolicyGroup to prevent the creation and update of PolicyReport objects to hide non-compliant resources.\nMoreover, the same attacker might use a mutating AdmissionPolicy to alter the contents of the PolicyReport created inside of the namespace.\n\n### Patches\n\nStarting 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.\nThe new validation will also restrict the usage of wildcards when defining apiGroups and resources rules for AdmissionPolicy and AdmissionPolicyGroup objects.\n\n### Workarounds\n\nOn 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:\n\n```yaml\napiVersion: policies.kubewarden.io/v1\nkind: ClusterAdmissionPolicy\nmetadata:\n name: \"deny-interaction-with-policyreport\"\nspec:\n module: registry://ghcr.io/kubewarden/policies/cel-policy:latest\n settings:\n variables:\n - name: hasWildcardInsideOfApiGroup\n expression: \"object.spec.rules.exists(r, r.apiGroups.exists(ag, ag == '*'))\"\n - name: hasWildcardInsideOfResources\n expression: \"object.spec.rules.exists(r, r.resources.exists(ag, ag == '*' || ag == '*/*' || ag == 'policyreports/*'))\"\n - name: dealsWithPolicyReportApiGroup\n expression: \"object.spec.rules.exists(r, r.apiGroups.exists(ag, ag == 'wgpolicyk8s.io'))\"\n - name: dealsWithPolicyReportResource\n expression: \"object.spec.rules.exists(r, r.resources.exists(ag, ag == 'policyreports' || ag == 'policyreports/'))\"\n - name: isPendingDeletion\n expression: \"has(object.metadata.deletionTimestamp)\"\n validations:\n - expression: |\n !( variables.hasWildcardInsideOfApiGroup ||\n variables.hasWildcardInsideOfResources ||\n variables.dealsWithPolicyReportResource ||\n variables.dealsWithPolicyReportApiGroup\n ) || variables.isPendingDeletion\n message: \"cannot target PolicyReport resources or use wildcards in apiGroups or resources\"\n rules:\n - apiGroups: [\"policies.kubewarden.io\"]\n apiVersions: [\"v1\"]\n operations: [\"CREATE\", \"UPDATE\"]\n resources: [\"admissionpolicies\", \"admissionpolicygroups\"]\n mutating: false\n backgroundAudit: true\n```\n\n### For more information\n\nIf you have any questions or comments about this advisory you can contact the Kubewarden team using the procedures described under the “[security disclosure](https://docs.kubewarden.io/disclosure)“ guidelines of the Kubewarden project.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/kubewarden/kubewarden-controller"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.7.0"
}, {
"fixed" : "1.21.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kubewarden/kubewarden-controller/security/advisories/GHSA-fc89-jghx-8pvg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24376"
}, {
"type" : "WEB",
"url" : "https://github.com/kubewarden/kubewarden-controller/commit/8124039b5f0c955d0ee8c8ca12d4415282f02d2c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kubewarden/kubewarden-controller"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-3434"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-155" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-30T17:52:37Z",
"nvd_published_at" : "2025-01-30T16:15:31Z"
}
}