/

CVE-2026-56667

Severity:

HIGH RISK

(7.3)

Stored XSS (CWE-79) in ZITADEL Login V2 Redirect URIs

CVE-2026-56667

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Stored Cross-Site Scripting leading to browser code execution

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

ZITADEL Login V2 contains a stored cross-site scripting vulnerability in certain OIDC and SAML error paths where redirect URIs are used without safety checks.

If an administrator configures a malicious JavaScript or data URI as the default redirect, it can execute in a user's browser whenever the affected login error condition is triggered.

Affected context

This vulnerability appears in ZITADEL's Login V2 flows for OIDC and SAML when handling FailedPrecondition errors.

It is relevant in deployments where organization or instance administrators can set loginSettings.defaultRedirectUri, and where those values are later used for client-side navigation.

The issue manifests when redirect URIs are not validated against a safelist or scheme check before being passed to the routing logic in the browser.

Exploit preconditions

  • Attack surface: User login flows in ZITADEL Login V2 for OIDC and SAML.
  • Required access: Ability to configure loginSettings.defaultRedirectUri (typically organization or instance admin privileges).
  • Trigger point: A FailedPrecondition error during login that causes the client to call router.push with the stored default redirect.
  • Why exploitation is possible: The redirect value is used without applying an isSafeRedirectUri check, allowing JavaScript or data URIs to be interpreted and executed by the browser.

Why this happens

The underlying bug is a client-side redirect handling pattern that assumes stored redirect URIs are safe and does not re-validate them at use time.

In the FailedPrecondition error paths, loginSettings.defaultRedirectUri is passed directly to router.push without invoking the safety check (isSafeRedirectUri), violating the expectation that navigation targets are constrained to benign locations.

This maps to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting), because attacker-controlled script-capable URIs are incorporated into the web application flow and can lead to execution in the user's browser.

Potential impact

  • Malicious JavaScript execution in the user's browser during login error handling.
  • Theft of session tokens or other sensitive authentication data.
  • Phishing-style UI manipulation within the identity portal.
  • Unwanted redirection to attacker-controlled resources.
  • Potential compromise of accounts through injected scripts that act on behalf of the user.

General mitigation guidance

Effective mitigation focuses on consistently validating and constraining redirect targets used in authentication flows.

Recommended patterns include:

  • Applying a strict isSafeRedirectUri-style check to all redirect URIs at the point of use, not just at configuration time.
  • Restricting allowed URI schemes to HTTPS (and other trusted schemes) and rejecting javascript: or data: URIs outright.
  • Using an allowlist of known-good domains or paths for post-login and error redirects, with centralized enforcement.
  • Treating administrative configuration values as untrusted input and subjecting them to the same validation and encoding rules as user input.
  • Designing login error handling to avoid dynamic client-side navigation based on unvalidated configuration fields.

How teams detect issues like this

Detection can rely on a combination of code-level and configuration-level analysis:

  • Static analysis rules that flag uses of client-side routing APIs (e.g., router.push) with unvalidated configuration or request parameters.
  • Code review checklists that require verification of redirect validation logic in all authentication and error-handling paths.
  • Security tests that attempt to store javascript: or data: URIs in redirect-related configuration and observe browser behavior during login failures.
  • Policy enforcement that scans configuration stores for unsafe URI schemes or patterns and alerts maintainers.
  • Use of automated application security testing tools that specialize in discovering XSS and unsafe redirect behaviors in login flows.

Sources

SourceLink
github.comgithub.com/zitadel/zitadel/commit/038265925a3b05ac1df8aad461ab071983e9eb85
github.comgithub.com/zitadel/zitadel/releases/tag/v4.15.3
github.comgithub.com/zitadel/zitadel/security/advisories/GHSA-5wcj-9wj4-j65h

Frequently asked

questions

Exploitation generally requires organization or instance administrator-level access to configure loginSettings.defaultRedirectUri. Once configured with a malicious URI, any affected user encountering the specific login error path can be impacted.

Not necessarily. The attacker needs control over the redirect configuration, not the user's credentials. When users hit the vulnerable error path, the stored malicious URI can execute in their browsers.

The safest approach is to enforce strict validation of all redirect URIs at the moment they are used. This includes rejecting script-capable schemes, applying an allowlist of trusted domains, and centralizing redirect safety checks so they cannot be bypassed in specific error paths.

Treat all configuration-driven navigation data as untrusted input, implement a uniform redirect validation routine, and ensure authentication and error-handling flows are covered by security-focused code review and automated tests. Regularly audit login-related configuration for unsafe URI patterns and enforce security policies across deployments.

Find out what's already
exploitable in your codebase.