The vulnerability consists of three related issues in Fulcio's OIDC discovery client. The root cause is that the HTTP client used for discovery would follow cross-host redirects by default. This could be exploited in several ways:
-
Server-Side Request Forgery (SSRF): A malicious OIDC issuer could redirect Fulcio's discovery request to an internal, non-public service. The function github.com/sigstore/fulcio/pkg/config.httpClientForIssuer was responsible for creating the client that exhibited this vulnerable behavior.
-
Kubernetes ServiceAccount Token Leakage: Fulcio uses a custom HTTP transport, bearerTokenTransport, to attach a Kubernetes ServiceAccount token to requests for authentication. The RoundTrip method of this transport, github.com/sigstore/fulcio/pkg/config.bearerTokenTransport.RoundTrip, attached the token to any request, regardless of the destination host. When a redirect occurred to a malicious external server, this sensitive token was leaked.
-
JWKS Substitution: The redirect could also be used to point to a malicious jwks_uri on an attacker-controlled server. This would cause Fulcio to fetch and cache the attacker's JSON Web Key Set (JWKS), effectively poisoning the verifier cache and allowing the attacker to forge valid signatures.
The entry point for this vulnerable workflow is the github.com/sigstore/fulcio/pkg/config.FulcioConfig.GetVerifier function, which triggers the OIDC discovery. The patch addresses these issues by adding a CheckRedirect callback to the HTTP client to block cross-host redirects and by modifying the bearerTokenTransport to only attach the token when the request's host matches the intended issuer's host.