Summary
A Server-Side Request Forgery (SSRF) vulnerability in Kyverno's CEL HTTP library (pkg/cel/libs/http/) allows users with namespace-scoped policy creation permissions to make arbitrary HTTP requests from the Kyverno admission controller. This enables unauthorized access to internal services in other namespaces, cloud metadata endpoints (169.254.169.254), and data exfiltration via policy error messages.
Impact
http.Get() and http.Post() available in CEL-based policies (policies.kyverno.io API group) do not enforce any URL restrictions. Unlike resource.Lib, which enforces namespace boundaries for namespaced policies, http.Lib allows unrestricted access to any URL. A user with namespace-scoped permission to create NamespacedValidatingPolicy can:
- Reach internal services in other namespaces (cross-namespace data access)
- Hit the cloud instance metadata service at
169.254.169.254to harvest IAM credentials issued to the cluster nodes - Exfiltrate response bodies via the policy's validation error messages
This is a different code path from related apiCall issues (CVE-2026-22039, CVE-2026-41323, CVE-2026-40868) — those targeted pkg/engine/apicall/, while this is in pkg/cel/libs/http/http.go.
Detection
Audit NamespacedValidatingPolicy and policies.kyverno.io resources for CEL expressions invoking http.Get(...) or http.Post(...). Treat any external URL or any URL pointing at 169.254.169.254, metadata.google.internal, or in-cluster services in other namespaces as a strong signal.
Pair with audit-log review and egress-log review for outbound HTTP from the Kyverno admission controller pod to unexpected destinations during the affected window.
Mitigation
Upgrade Kyverno to v1.16.4 or later.
Workarounds until patched:
- Restrict who can create or update
NamespacedValidatingPolicyand otherpolicies.kyverno.ioresources via tight RBAC. - Block egress from the kyverno namespace to the cloud metadata service via
NetworkPolicy(169.254.169.254andfd00:ec2::254). - If CEL
http.Get/http.Postis not used, consider disabling thepolicies.kyverno.ioCRD set on affected versions.