Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/kubewarden/kubewarden-controller
  4. ›
  5. CVE-2026-42541

CVE-2026-42541: Kubewarden vulnerable to RBAC Reconnaissance via unchecked can_i host capability call

May 5, 2026

Kubewarden is a policy engine for Kubernetes. Kubewarden cluster operators can grant permissions to users to deploy namespaced AdmissionPolicies and AdmissionPolicyGroups in their Namespaces. One of Kubewarden promises is that configured users can deploy namespaced policies in a safe manner, without privilege escalation.

An attacker with privileged AdmissionPolicy or AdmissionPolicyGroup create permissions (which isn’t the default) can craft a policy that makes use of the can_i host callback. The callback issues a SubjectAccessReview (SAR) requests to enumerate RBAC permissions of any user or service account across the cluster. Three operations on the host capabilities kubewarden/kubernetes binding enforce the context-aware allow-list via can_access_kubernetes_resource():

  • list_resources_by_namespace
  • list_resources_all
  • get_resource

However, can_i does not perform that check and forwards the request directly to the callback handler, which executes a real SubjectAccessReview using policy-server privileges. This creates a policy-level authorization gap: can_i is effectively usable even when the policy has no context-aware resource grant.

This is an information disclosure / reconnaissance issue, and not direct workload data exfiltration. The attacker learns permission information, such as whether specific service accounts can “get secrets”, “create pods”, or “bind clusterroles” in chosen namespaces.

References

  • docs.kubewarden.io/howtos/policy-servers/namespaced-policies-capabilities
  • github.com/advisories/GHSA-wqcw-g35j-j578
  • github.com/kubewarden/docs/pull/737
  • github.com/kubewarden/kubewarden-controller
  • github.com/kubewarden/kubewarden-controller/pull/1693
  • github.com/kubewarden/kubewarden-controller/security/advisories/GHSA-wqcw-g35j-j578
  • nvd.nist.gov/vuln/detail/CVE-2026-42541

Code Behaviors & Features

Detect and mitigate CVE-2026-42541 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.35.0

Fixed versions

  • 1.35.0

Solution

Upgrade to version 1.35.0 or above.

Impact 4.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-862: Missing Authorization

Source file

go/github.com/kubewarden/kubewarden-controller/CVE-2026-42541.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 00:19:32 +0000.