{"id":"CVE-2026-42541","aliases":["CVE-2026-42541","GHSA-wqcw-g35j-j578","GO-2026-5716"],"related":[],"kind":"vulnerability","state":"published","title":"Kubewarden: RBAC Reconnaissance via unchecked can_i host capability call","summary":"Kubewarden is a policy engine for Kubernetes. Prior to , 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. can_i does not perform that check to enforce the context-aware allow-list 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. This vulnerability is fixed in .","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Kubewarden is a policy engine for Kubernetes. Prior to , 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. can_i does not perform that check to enforce the context-aware allow-list 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. This vulnerability is fixed in .","source":"cvelist"},{"lang":"en","text":"### Impact\nKubewarden 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.\n\nAn 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()`:\n\n- `list_resources_by_namespace`\n- `list_resources_all`\n- `get_resource`\n\nHowever, `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.\n\nThis 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.\n\n### Patches\n\nCluster Operators, if providing their users with privileges to deploy AdmissionPolicies or AdmissionPolicygroups (which isn't the default), must then also deploy PolicyServers with reduced permissions for host capability calls. This includes the PolicyServer `default`. \nFor that, make use of the new feature in v1.35:\n- For custom PolicyServers: Set the new `PolicyServer.spec.namespacedPoliciesCapabilities` , for example to an empty list `[]` which doesn't allow any capability.\n- For the `default` PolicyServer, set the `.Values.policyServer.namespacedPoliciesCapabilities` , for example to an empty list `[]` which doesn't allow any capability. \n\nAlso, if needed, they must ensure that those namespaced AdmissionPolicies or AdmissionPolicygroups are scheduled in the PolicyServers with reduced permissions.\nFor that, they could make use of the new [ns-policyserver-mapper](https://artifacthub.io/packages/kubewarden/kubewarden-policy-library/ns-policyserver-mapper) policy, their own policy or other means, such as GitOps.\n\nSee: https://docs.kubewarden.io/howtos/policy-servers/namespaced-policies-capabilities\n\n### Workarounds\n\nCluster Operators can opt for:\n- Not allowing users to create namespaced policies (AdmissionPolicies, AdmissionPolicyGroups).\n- Removing SubjectAccessReview \"create\" permissions for the PolicyServer ServiceAccount RBAC being used, in custom PolicyServers and the  PolicyServer `default`.\n\n### Resources\n\n- Code changes, with new security feature: https://github.com/kubewarden/kubewarden-controller/pull/1693\n- Documentation changes: https://github.com/kubewarden/docs/pull/737\n  - Explained new feature on 1.35.0\n  - Updated Threat model assessment","format":"markdown","source":"ghsa"},{"lang":"en","text":"Kubewarden vulnerable to RBAC Reconnaissance via unchecked can_i host capability call in github.com/kubewarden/kubewarden-controller","format":"markdown","source":"go"},{"lang":"es","text":"Kubewarden es un motor de políticas para Kubernetes. Antes de , Un atacante con permisos privilegiados de creación de AdmissionPolicy o AdmissionPolicyGroup (lo cual no es el valor predeterminado) puede elaborar una política que utiliza el callback del host can_i. El callback emite solicitudes de SubjectAccessReview (SAR) para enumerar los permisos RBAC de cualquier usuario o cuenta de servicio en todo el clúster. can_i no realiza esa verificación para hacer cumplir la lista de permitidos consciente del contexto y reenvía la solicitud directamente al gestor del callback, que ejecuta un SubjectAccessReview real utilizando los privilegios del servidor de políticas. Esto crea una brecha de autorización a nivel de política: can_i es efectivamente utilizable incluso cuando la política no tiene una concesión de recursos consciente del contexto. Esto es un problema de revelación de información / reconocimiento, y no una exfiltración directa de datos de la carga de trabajo. El atacante aprende información de permisos, como si cuentas de servicio específicas pueden ’obtener secretos’, ’crear pods’ o ’vincular clusterroles’ en los espacios de nombres elegidos. Esta vulnerabilidad está corregida en .","source":"nvd"}],"published":"2026-05-05T21:49:03.000Z","modified":"2026-10-26T18:10:00.173Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-862"],"affected":[{"ranges":[{"version":"< 1.35.0","status":"affected"}],"vendor":"kubewarden","product":"kubewarden-controller","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.35.0"}],"ecosystem":"Go","package":"github.com/kubewarden/kubewarden-controller","purl":"pkg:golang/github.com/kubewarden/kubewarden-controller","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.35.0"}],"ecosystem":"Go","package":"github.com/kubewarden/kubewarden-controller","purl":"pkg:golang/github.com/kubewarden/kubewarden-controller","source":"go"}],"references":[{"url":"https://github.com/kubewarden/adm-controller/security/advisories/GHSA-wqcw-g35j-j578","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/kubewarden/kubewarden-controller/security/advisories/GHSA-wqcw-g35j-j578","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42541","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/kubewarden/docs/pull/737","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/kubewarden/kubewarden-controller/pull/1693","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://docs.kubewarden.io/howtos/policy-servers/namespaced-policies-capabilities","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/kubewarden/kubewarden-controller","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-14T12:23:09.477Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42541","url":"https://www.cve.org/CVERecord?id=CVE-2026-42541","licence":"CVE Terms of Use","modified":"2026-05-14T12:23:15.858Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wqcw-g35j-j578","url":"https://github.com/advisories/GHSA-wqcw-g35j-j578","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:10.020Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5716","url":"https://pkg.go.dev/vuln/GO-2026-5716","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:42.659Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42541","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42541","licence":"Public domain","modified":"2026-10-26T18:10:00.173Z"}],"updatedAt":"2026-11-25T22:59:21.446Z","epss":{"score":0.00171,"percentile":0.06805,"date":"2026-12-01T12:00:22.000Z"}}