Summary
When an external certificate signer (such as cert-manager istio-csr) is used, Istio's ExtractIDsFromSAN function in san.go matched on the ASN.1 tag number alone and ignored the class and constructed bit. An attacker who could submit a Certificate Signing Request containing an extra SAN entry with a mis-encoded tag (application-class 0x46 or constructed 0xa6) could cause istiod to treat that entry as a legitimate SPIFFE identity. Because Go's crypto/x509 layer and the TLS stack surface only the single correctly-encoded URI, TLS verification and the signer's own authorization check never see the extra entry, allowing the attacker to impersonate any namespace and service account reachable by the mesh. The built-in Istio CA and plugged-in cacerts are not affected.
Impact
An authenticated mesh principal with the ability to submit a CSR to an external signer can embed a mis-encoded SAN entry alongside their legitimate identity. istiod and ztunnel accept this extra entry as a valid workload identity, granting the attacker the privileges of any service account that passes the Kubernetes SubjectAccessReview for listing secrets in its namespace. The scope extends across the entire mesh: any workload whose identity can be forged via this method is at risk of its traffic being intercepted or its authorization policies being bypassed. Only deployments using an external certificate signer are affected; the built-in Istio CA and cacerts builds the SAN from the authenticated caller and are immune.
Detection
Monitor certificate issuance events in your external signer's audit log for CSRs containing multiple SAN entries or non-standard ASN.1 encodings. Review istiod's CA gRPC server logs and XDS mTLS authenticator logs for unexpected identity claims from workloads. After upgrading, consider auditing issued leaf certificates for SAN anomalies using openssl x509 -text -noout and verifying that no entry outside the expected SPIFFE URI is present.
Mitigation
Upgrade to Istio 1.30.9, 1.31.5, or 1.32.1, which fix ExtractIDsFromSAN to validate both the ASN.1 class and constructed bit before accepting an entry as a URI SAN. As an immediate workaround, switch to the built-in Istio CA or plugged-in cacerts instead of an external signer; these paths build the SAN directly from the authenticated caller and are not affected. Alternatively, configure the external signer to reject CSRs that contain extra or mis-encoded SAN entries.
Related Security Guidance
- Service Mesh Security — mTLS, zero-trust networking, and policy-based access control with Istio and other service meshes
- Traffic Hijacking — how identity impersonation enables traffic interception and manipulation between workloads
- Certificates — role of X.509 certificates and certificate management in Kubernetes authentication