GHSA-qr4g-8hrp-c4rw: Kyverno has unrestricted outbound requests in Kyverno apiCall enabling SSRF
Summary A Server-Side Request Forgery (SSRF) vulnerability in Kyverno allows authenticated users to induce the admission controller to send arbitrary HTTP requests to attacker-controlled endpoints. When a ClusterPolicy uses apiCall.service.url with variable substitution (e.g. {{request.object.}}), user-controlled input can influence the request target.
Published Apr 14, 2026
Affected packages
github.com/kyverno/kyverno
- Ecosystem
- Go
- Affected
- <= 1.17.1
- Fixed in
- No patched version yet
- Check
go list -m github.com/kyverno/kyverno
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
A Server-Side Request Forgery (SSRF) vulnerability in Kyverno allows authenticated users to induce the admission controller to send arbitrary HTTP requests to attacker-controlled endpoints.
When a ClusterPolicy uses apiCall.service.url with variable substitution (e.g. {{request.object.*}}), user-controlled input can influence the request target. The Kyverno admission controller executes these requests from its privileged network position without enforcing any validation or network restrictions.
The issue becomes non-blind SSRF, as response data from internal services can be reflected back to the user via admission error messages.
---
Details
Kyverno supports variable substitution in apiCall.service.url, a documented feature intended to enable dynamic external lookups during admission control.
However, the current implementation lacks fundamental safeguards in the HTTP execution path:
Missing protections
- No URL validation User-controlled input is directly embedded into the request URL without validation or normalization.
- No IP filtering Requests can target:
- Loopback (
127.0.0.1) - Link-local (
169.254.0.0/16) - Cloud metadata services (e.g. AWS IMDS)
- Internal ClusterIP services
- Redirect handling not restricted The Go HTTP client uses default redirect behavior (
CheckRedirect == nil), allowing up to 10 redirects without re-validation of the target.
- Response data reflection in admission errors Response bodies are propagated back to the user in admission responses under certain conditions.
Non-blind SSRF behavior
The vulnerability is non-blind through two mechanisms:
- Non-2xx responses Response body is returned in admission error messages (e.g.
executor.go:98-101)
- 2xx responses with non-JSON content Parsing failures (JSON/JMESPath) include response snippets in error output
This allows attackers to retrieve data from internal services directly via kubectl output.
---
PoC
Preconditions
- A
ClusterPolicyusing:
apiCall:
service:
url: "http://{{ request.object.metadata.annotations.target }}"- An authenticated user able to create matching resources (e.g. Pods)
---
Step 1 — Create malicious resource
apiVersion: v1
kind: Pod
metadata:
name: ssrf-test
annotations:
target: "169.254.169.254/latest/meta-data/iam/security-credentials/"
spec:
containers:
- name: test
image: nginx---
Step 2 — Apply resource
kubectl apply -f pod.yaml---
Step 3 — Observe output
Example output:
Error from server: admission webhook "kyverno" denied the request:
failed to process apiCall: <response body from metadata service>---
Variations
- Internal services: http://kubernetes.default.svc
- Loopback: http://127.0.0.1:8080
- Redirect chains to bypass naive filters
---
Impact
Vulnerability class
- Server-Side Request Forgery (SSRF)
- Non-blind data exfiltration
Affected scope
- Kubernetes clusters using Kyverno policies with
apiCall.service.urland variable substitution
Impact details
- Access to internal services (ClusterIP, localhost)
- Access to cloud metadata endpoints (e.g. IMDSv1 → credential exposure)
- Internal network reconnaissance
- Multi-tenant boundary weakening
This issue can be combined with automatic ServiceAccount token forwarding (reported separately) to form a critical attack chain.
Credited to scumfrog.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-54523
Kyverno's NamespacedGeneratingPolicy generator.apply() namespace argument unvalidated -- background controller creates RoleBindings in any namespace including kube-system
critical9.6Aug 26, 2026CVE-2026-41485
Kyverno Controller Denial of Service via forEach Mutation Panic
high7.7Apr 24, 2026CVE-2026-41068
Kyverno: Cross-Namespace Read Bypasses RBAC Isolation (CVE-2026-22039 Incomplete Fix)
high7.7No fixApr 16, 2026CVE-2026-41323
Kyverno: ServiceAccount token leaked to external servers via apiCall service URL
high8.1Apr 16, 2026GHSA-8wfp-579w-6r25
Kyverno apiCall automatically forwards ServiceAccount token to external endpoints (credential leak)
high7.7Apr 16, 2026CVE-2026-40868
kyverno apicall servicecall implicit bearer token injection leaks kyverno serviceaccount token
high8.1Apr 14, 2026
