Capsule Proxy Authentication bypass using an empty token
Critical severity
GitHub Reviewed
Published
Nov 23, 2023
in
projectcapsule/capsule-proxy
•
Updated Nov 27, 2023
Description
Published to the GitHub Advisory Database
Nov 24, 2023
Reviewed
Nov 24, 2023
Published by the National Vulnerability Database
Nov 24, 2023
Last updated
Nov 27, 2023
The privilege escalation is based on a missing check if the user is authenticated based on the
TokenReview
result.All the clusters running with the
anonymous-auth
Kubernetes API Server setting disable (set tofalse
) are affected since it would be possible to bypass the token review mechanism, interacting with the upper Kubernetes API Server.PoC
Start a KinD cluster with the
anonymous-auth
value tofalse
.If it is true, it uses anonymous permissions which are very limited by default
Install
capsule
andcapsule-proxy
Then query the proxy
Impact
The whole cluster is exposed to unauthorised users.
This privilege escalation cannot be exploited if you're relying only on client certificates (SSL/TLS).
References