magikarp@home:~$

Who gets to say the login is finished? The ZITADEL zero-factor session advisory

Hi there,

every login has a moment where somebody says “okay, this user is done, hand out the tokens”. We spend a lot of energy on everything before that moment: passwords, MFA, passkeys, risk checks. But who is actually allowed to make that final call? On December 1, 2026, the CVE record for a ZITADEL advisory went public, and it is a nice reminder that the answer to that question is part of your authentication, too.

What was published?

The GitHub advisory GHSA-3gwf-ph53-v73c is titled “Login V2: authentication bypass via unauthenticated (zero-factor) session for OIDC and SAML requests”. The advisory itself dates from November 13; the CVE record for CVE-2026-140412 followed on December 1. The key facts:

  • Affected: ZITADEL 4.0.0 up to 4.20.2, including release candidates.
  • Fixed: 4.20.3.
  • Severity: CVSS 3.1 7.4 (High) in the advisory; the CVE record adds a CVSS 4.0 score of 9.1. Weakness: CWE-287, Improper Authentication.
  • Impact: tokens or a SAML response that sign in as the victim, even when MFA was not satisfied, at any OIDC or SAML application on the instance. The advisory names account takeover at public (PKCE) clients, implicit/hybrid clients and SAML service providers. Impact stays within a single instance.
  • Exploitation: none known. CISA’s enrichment in the CVE record lists exploitation as “none”.
  • Workaround: the advisory is blunt: “There is no configuration that fully closes this gap on unpatched versions.”

Credit goes to Lucas Dodgson from InfoGuard Labs and Mario Schlipf for reporting it.

If you run a self-hosted ZITADEL 4.x instance and you only read one line of this post: upgrade to 4.20.3.

Two steps that must never be confused

ZITADEL separates two things that many people mentally squash into one:

  1. Creating a session. The user proves who they are: password, passkey, external IdP, MFA. Each verified factor gets recorded on the session.
  2. Completing an authorization request. An OIDC or SAML app asked “please log this user in”. Somebody now links a session to that request, and ZITADEL issues tokens or a SAML response.

According to the advisory, step 2 is meant to be done only by a login client holding the session.link permission, and that login client “is responsible for verifying the session first”. That check was not enforced. So a session in which no factor had been verified could still be used to finish the request.

Through the hosted Login V2, the advisory says this needed only the victim’s login name, in two setups: the user has two or more linked identity providers, or the organization disables local authentication and offers two or more IdPs. Both are “possible under the default login policy”. Offering “Sign in with Microsoft” and “Sign in with Google” is hardly rare.

The general lesson: a session existing is not the same as a session being authenticated. Any system that issues tokens has to ask, at the very last step, “which factors were verified, and do they meet what this request requires?” Not “is there a session with that user’s name on it?”

A header is not an identity

The second route is the one I find most instructive. The OIDC CreateCallback and SAML CreateResponse endpoints, per the advisory, “trusted the x-zitadel-login-client header to identify the login client”. That header was recorded from the unauthenticated authorization request without validation. So any authenticated user could claim to be the login client for a session they held the ID and token for.

The advisory is careful about limits here: this route does not let anyone create sessions for other users. That still needs session.write. But it is a textbook example of a pattern we keep seeing:

  • Request metadata is attacker-controlled. Headers, query parameters, “client hints”: all of them are just text the caller chose.
  • Authorization must come from credentials, not claims. Who the caller is should come from a verified token and its permissions, not from a label in the request.
  • “Only our UI sends this” is not a control. Whatever your UI sends, curl can send too.

Every time an internal header decides who you are, a pentester somewhere gets a little warm feeling in their heart.

What I would check this week

  • Upgrade ZITADEL to 4.20.3 or later. If you can’t do it right away, the advisory describes a partial mitigation: if your login UI doesn’t rely on the x-zitadel-login-client header (the hosted Login V2 doesn’t), strip that header at your reverse proxy. It only covers the completion endpoints, not the hosted Login V2 route.
  • Check your custom login clients before upgrading. After the patch, the header alone no longer grants anything; session.link comes from the Instance Login Client role (IAM_LOGIN_CLIENT). The advisory warns that a custom login client using, for example, an Instance Owner account without that permission “will receive ‘permission denied’ after the upgrade”.
  • Review logins on apps that trust the instance, especially public PKCE clients and SAML service providers, for sign-ins without the factors your policy expects. I haven’t seen published indicators, so this is general hygiene.
  • Ask the same question of your own stack. Wherever a component turns “session” into “token”, does it check the verified factors at that point? Does it ever trust a header to decide who the caller is?

Conclusion

Nothing exotic broke here. No crypto, no parser trick. The system simply didn’t ask, at the final step, whether the person behind the session had proven anything, and who was really asking to finish the login. There is no known exploitation, the fix is one upgrade away, and the questions it raises are free to ask of every identity system you run.

Stay curious, and may all your sessions have at least one factor,

Magikarp

This post was researched and written by an AI agent (Claude) in Magikarp’s style and published automatically.