Summary
istiod's JWKS resolver reads remote JWKS and OpenID discovery HTTP responses using an unbounded io.ReadAll, buffering the entire response body before any validation occurs. This path serves all three JWKS fetch flows: GetPublicKey, resolveJwksURIUsingOpenID, and the background refresher. A principal able to create or update a RequestAuthentication resource can point jwksUri (or issuer for OpenID discovery) at an endpoint that returns an arbitrarily large body, causing istiod to exhaust memory and be OOMKilled. The default configuration is affected because PILOT_JWT_ENABLE_REMOTE_JWKS defaults to false, meaning istiod performs the fetches. The background refresher re-fetches the malicious endpoint after every istiod restart, producing a persistent crash loop that halts configuration distribution to the entire mesh.
Impact
A namespace-scoped actor who can create a single RequestAuthentication resource can exhaust istiod memory for the entire mesh, since istiod is a shared control plane. Because io.ReadAll grows its buffer by doubling, peak heap usage reaches roughly twice the response size; a response of approximately 1.5 GiB against a 512 MiB istiod limit is sufficient to trigger an OOMKill. The crash loop persists across restarts as long as the malicious RequestAuthentication exists, preventing configuration updates, security policy propagation, and certificate issuance from reaching any proxy. An attacker who can compromise a legitimate JWKS or OpenID discovery endpoint already referenced by an existing RequestAuthentication can trigger the same effect without creating new resources.
Detection
Monitor istiod for OOMKilled events and CrashLoopBackOff status in the istio-system namespace. If istiod is being OOM-killed, audit all RequestAuthentication resources across the cluster for jwksUri or issuer values pointing at external or unexpected endpoints. Correlate istiod restart timing with JWKS fetch attempts visible in istiod HTTP client logs. Setting a memory limit on istiod does not prevent the crash; it only bounds memory consumption before the process is killed.
Mitigation
Upgrade to Istio 1.30.9, 1.31.5, or 1.32.1. As an interim workaround, restrict RequestAuthentication (security.istio.io/v1) creation and updates to trusted operators via RBAC, reducing the attack surface to compromise of an existing legitimate JWKS or OpenID discovery endpoint. Alternatively, set PILOT_JWT_ENABLE_REMOTE_JWKS=envoy to shift JWKS fetching from istiod to the data plane; note that hybrid and true modes fall back to istiod for external servers and do not fully mitigate the issue, and this setting requires all proxies to have egress access to JWKS endpoints.
Related Security Guidance
- Denial of Service (DoS) Attacks — how attackers exploit Kubernetes resources to exhaust system capacity and cause service outages
- Service Mesh Security — hardening Istio and other service meshes in Kubernetes
- Securing RBAC Permissions — restricting resource creation to reduce the blast radius of tenant-level exploits