DEV Community

Ioneyrezende
Ioneyrezende

Posted on

ZITADEL Login V2 Must Verify the Session Before Issuing Tokens

ZITADEL Login V2 Must Verify the Session Before Issuing Tokens

ZITADEL 4.0.0 through 4.20.2 can issue OIDC tokens or a SAML response for a session that did not satisfy the authorization request's authentication requirements. The vendor describes CVE-2026-140412 as a zero-factor authentication bypass and fixed it in 4.20.3.

The defect is not a missing password check inside a single page. It is a missing authorization guarantee at request completion. Completing a request is supposed to require a login client with the session.link permission and a verified session. The affected versions did not enforce that relationship consistently through hosted Login V2 and the direct OIDC and SAML completion endpoints.

Two reachable paths

Through hosted Login V2, an unauthenticated attacker who knows a victim's login name could complete a request with a session that had no verified authentication factor when the user had two or more linked identity providers, or when local authentication was disabled and two or more identity providers were offered.

The direct completion endpoints required an account on the instance and a session already held for the victim. The attacker could spoof the x-zitadel-login-client header because ZITADEL recorded it from an unauthenticated request without validating it.

Successful exploitation could produce tokens or SAML assertions for applications trusting the instance, including public clients registered for PKCE, implicit or hybrid flows. This is account takeover at relying parties, not merely a malformed login page.

Upgrade and test

Upgrade to 4.20.3 or later. Test OIDC and SAML completion with a valid login client, a client without session.link, a session without a verified factor and a forged login-client header. Every invalid case should fail closed.

Review authentication logs for successful token issuance tied to incomplete authentication sessions, unusual login-client header values and OIDC or SAML requests completed from new network locations. If an instance used multiple linked identity providers, broaden the review window beyond the patch date.

Design implication

Identity providers should bind the completed transaction to the client, session and assurance level in one server-side decision. A header that names the login client is input, not authority. Once that principle is in place, the hosted UI and direct APIs can share the same completion check instead of implementing separate assumptions.

References

Top comments (0)