Summary
A flaw in ZITADEL's Login V2 flow allowed attackers to abuse default redirect URIs in the login interface to influence where users were sent after authentication.
Under certain conditions, this could enable an attacker to steer victims through a malicious redirect sequence and potentially take over accounts, especially when combined with stolen or misdirected tokens and user confusion.
Affected context
The vulnerability arises in ZITADEL deployments using the Login V2 interface where redirect URIs are automatically selected or defaulted during login flows.
It is most relevant when applications rely on redirect parameters for post-login navigation and when users can be convinced to follow crafted login links.
The risk increases when redirect handling is loosely validated or when multiple relying parties share the same identity provider without strict redirect URI whitelisting.
Exploit preconditions
- Attack surface: Public-facing ZITADEL Login V2 endpoint exposed to end-users and the internet.
- Required access: Ability to send crafted login links or initiate login flows (e.g., via phishing, embedded links, or malicious application flows).
- Trigger point: The login process where a redirect URI (or a default redirect) is chosen and executed after authentication.
- Why exploitation is possible: The login interface allowed use or manipulation of a default redirect URI in a way that did not sufficiently constrain where the user and their authenticated session or tokens were sent.
Why this happens
The core issue is insufficiently constrained redirect behavior in the login flow.
Instead of requiring strict, pre-registered, and context-validated redirect URIs, the implementation relied on default or loosely validated redirect parameters.
This aligns with open redirect and related web flow weaknesses, where user-controlled or weakly controlled navigation endpoints can be abused to misroute authenticated users, confuse them about the trust boundary, and potentially expose tokens or session context.
In practice, the login logic did not adequately enforce that post-authentication redirects only go to vetted, application-specific destinations.
Potential impact
- Users may be redirected to attacker-controlled domains after login.
- Attackers could capture authentication tokens or codes if the flow exposes them through the redirect.
- Account takeover may occur if session cookies, authorization codes, or tokens are misdirected or harvested.
- Phishing and credential theft can be made more convincing by leveraging legitimate-looking login flows.
- Confusion of users about which application or domain is actually receiving their authenticated session.
General mitigation guidance
Effective mitigation focuses on hardening redirect handling and reducing trust in client-supplied navigation parameters:
- Restrict redirect URIs to a strict, pre-registered allowlist per client or application.
- Avoid using default or fallback redirect URIs that can be influenced indirectly by user input or ambiguous configuration.
- Bind redirect URIs tightly to client identifiers and validate them before initiating the login flow.
- Normalize and compare redirect URIs against canonical forms instead of performing substring or loose validations.
- Minimize sharing of tokens through redirect parameters; favor secure back-channel mechanisms where possible.
- Provide clear user-facing indicators of the destination application/domain to reduce susceptibility to phishing.
How teams detect issues like this
Detection usually involves a mix of code, configuration, and behavior analysis:
- Static analysis and code review checks for places where redirect URLs are derived from request parameters, headers, or loosely validated configuration.
- Review of login and OAuth/OIDC flows to ensure redirect URIs are strictly checked against an allowlist and appropriately bound to clients.
- Logging and monitoring of redirect targets, looking for unusual external domains or non-approved hosts in post-login redirects.
- Security testing of identity flows (e.g., OIDC/OAuth penetration tests) to attempt open redirects and capture tokens.
- Use of automated security scanners or IAM-focused review tools that flag dynamic or unvalidated redirect endpoints.

