Skip to main content
HIGH8.1CVE-2026-40868GHSA-q93q-v844-jrqp
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
Affected projects
kyverno
Disclosed
Last updated

Affected versions

ProjectVulnerable range
github.com/kyverno/kyverno< 1.17.0

Patched versions

ProjectFixed in
github.com/kyverno/kyverno1.17.0

References

Summary​

Kyverno's apiCall service-call helper implicitly injects Authorization: Bearer <token> using the Kyverno controller's ServiceAccount token whenever a policy does not explicitly set an Authorization header. Because context.apiCall.service.url is fully policy-controlled, this design sends the Kyverno SA token to any endpoint the policy author specifies — a classic confused-deputy problem. Namespaced policies are blocked from service-call usage by the urlPath gate in pkg/engine/apicall/apiCall.go, so this issue is scoped to ClusterPolicy and global-context entries.

Impact​

An attacker who can create or update a ClusterPolicy (or a GlobalContextEntry) that uses context.apiCall.service.url can direct the request URL to an attacker-controlled host and observe the implicitly injected Bearer token. A realistic path is a compromised GitOps policy repository: if the policy store is tampered with, the resulting ClusterPolicy becomes untrusted input that Kyverno executes with its own high-privilege SA. With the default Helm RBAC binding, the leaked token grants read and patch rights over admission webhook configurations, which is sufficient to subvert the entire admission layer.

Detection​

Audit ClusterPolicy and GlobalContextEntry resources for apiCall.service.url values pointing outside the cluster — any URL lacking an .svc suffix or resolving to a public IP or external DNS name should be treated as a potential exfiltration sink. Pair this with audit-log review for patch operations against MutatingWebhookConfiguration and ValidatingWebhookConfiguration performed by the Kyverno admission controller's SA outside expected reconciliation windows.

Mitigation​

Upgrade Kyverno to v1.17.0 or later. Until patched:

  • Restrict who can create or update ClusterPolicy and GlobalContextEntry resources via tight RBAC.
  • Audit all existing policies for apiCall.service.url values pointing outside the cluster; remove or relocate any external references.
  • After upgrading, rotate the Kyverno SA token if there is any reason to suspect a malicious policy was applied during the affected window.

References​