Start with Identity
Identity CVE · OAuth / OIDC / JWT

CVE-2025-31123Zitadel JWT auth grant ignores key expiration

high
Product: ZitadelVendor: ZitadelDisclosed: 2025-03-27Status: PatchedProtocol deep diveNVD ↗

What broke

Zitadel accepted a JWT authorization grant without checking that the signing key was still inside its validity window. A key you thought you had retired still authenticated the client. The project shipped a patch.

Why it matters

Key expiration is how you contain a leaked machine credential. If the IdP ignores exp on the key (not just on the token), rotation is theater. Open-source IdPs are in a lot of homelab-to-production paths. This is a control you assume exists.

What to do

  • Upgrade Zitadel to the patched release.
  • Rotate any JWT grant keys that were valid across the vulnerable window, even if they are "expired" in the UI.
  • Confirm your other IdPs (Keycloak, authentik) actually enforce key expiry, not only token expiry.

After you patch

Token-layer flaws produce credentials that keep working after the patch, so remediation is about invalidating what was issued.

  • Rotate the signing keys published at your JWKS endpoint, then confirm relying parties refetch on an unknown key id rather than caching indefinitely.
  • Revoke refresh tokens and sessions. Access tokens expire on their own; refresh tokens are the ones that turn a short compromise into months of access.
  • Audit client registrations and consent grants created during the window, particularly any client with broad scopes or a redirect URI you do not recognize.
  • Verify validation on your side: pinned algorithms, issuer and audience checks, and no acceptance of alg: none. See JWT and the validate a JWT recipe.

Sources

Last reviewed By SWI Community TeamSuggest a correctionHow we research
Know a primary source we should add, or a patch status that has changed? Email community@startwithidentity.com. See all briefs in the identity CVE catalog, or volunteer as a CVE Analyst.
Compiled from vendor advisories, NVD, CISA KEV, and public research. CVSS figures can disagree across NVD and the CNA. Confirm affected versions against the vendor advisory before you patch. Independent, community-driven analysis. See the disclaimer.