CVE-2025-24376: Github.com/kubewarden/kubewarden controller Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-fc89-jghx-8pvg
CVSS 6.5
CWE-155
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2025-24376
GHSA Identifier GHSA-fc89-jghx-8pvg
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-155: Improper Neutralization of Wildcards or Matching Symbols
Affected Product Github.com/kubewarden/kubewarden controller
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (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.

github.com/kubewarden/kubewarden-controller fixed: 1.21.0
Upgrade github.com/kubewarden/kubewarden-controller to 1.21.0
Verify Direct and Transitive Dependencies

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

### 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](https://docs.kubewarden.io/explanations/audit-scanner/policy-reports) 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: ```yaml 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: true ``` ### For 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](https://docs.kubewarden.io/disclosure)“ guidelines of the Kubewarden project.

CVE-2025-24376 Affected Github.com/kubewarden/kubewarden controller Versions

1 component(s)
Fixed Versions:
1.21.0
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?
CVE-2025-24376 is a security vulnerability in Github.com/kubewarden/kubewarden controller involving KubeWarden's AdmissionPolicy and AdmissionPolicyGroup policies can be used to alter PolicyReport resources under CWE-155: Improper Neutralization of Wildcards or Matching Symbols.
Which Github.com/kubewarden/kubewarden controller versions are affected?
Affected versions include releases prior to 1.21.0 across affected packages: github.com/kubewarden/kubewarden-controller.
What version fixes CVE-2025-24376?
Upgrading to 1.21.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/kubewarden/kubewarden-controller affected?
Yes, github.com/kubewarden/kubewarden-controller is affected in releases prior to 1.21.0. Upgrade your dependency to 1.21.0 or later.
What is the CVSS score of CVE-2025-24376?
CVE-2025-24376 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2025-24376?
CVE-2025-24376 is classified under CWE-155: Improper Neutralization of Wildcards or Matching Symbols (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.).
How can I check Go dependencies for CVE-2025-24376?
Run the dependency tree command: 'inspect dependencies for github.com/kubewarden/kubewarden-controller'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}