/

CVE-2026-56668

Severity:

HIGH RISK

(8.1)

Scope Validation Flaw (CWE-862) in ZITADEL OAuth2

CVE-2026-56668

Deferred

Vulnerability type

Category:

Broken Authorization / Access Control

CWE:

CWE-862

Impact:

Privilege Escalation Across OAuth2 Clients

Severity:

HIGH RISK

(8.1)

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

An authorization flaw in ZITADEL's OAuth2 Token Exchange endpoint allows tokens to be exchanged without verifying that the subject token belongs to the requesting client or that requested scopes stay within the original token's privileges.

Under certain configurations, this can let a low-privilege token be traded for elevated permissions against another application that trusts ZITADEL-issued tokens.

Affected context

This vulnerability appears in ZITADEL deployments that use the OAuth2 Token Exchange grant type (urn:ietf:params:oauth:grant-type:token-exchange) for issuing tokens across applications.

It becomes relevant when multiple clients share the same identity provider and rely on ZITADEL to enforce client binding and scope limitations during token exchanges.

The risk is most pronounced where downstream applications honor exchanged tokens without performing additional audience or scope checks.

Exploit preconditions

  • Attack surface: OAuth2 / OIDC token endpoint exposed by ZITADEL.
  • Required access: Possession of a valid but low-privilege subject token and the ability to call the token exchange endpoint as an OAuth2 client.
  • Trigger point: Invoking the token exchange grant with a subject token issued for one client while requesting scopes or audiences associated with another application.
  • Why exploitation is possible: The endpoint does not sufficiently verify that:
  • The subject token is bound to the requesting client, and
  • The requested scopes are constrained to those granted in the original token.

Why this happens

The root cause is inadequate authorization checks in the token exchange flow, specifically missing validation of token ownership and scope inheritance rules.

Instead of enforcing strict client binding and scope containment, the implementation allows a client to present a token issued in a different context and request broader scopes or a different audience.

This maps to CWE-862: Missing Authorization, where the system fails to confirm that the caller is entitled to use the provided subject token in this way and to request the elevated permissions.

Potential impact

  • Low-privilege users may obtain tokens granting higher-privilege scopes.
  • Access could be gained to another application's APIs relying on ZITADEL tokens.
  • Cross-application privilege escalation within the same identity platform.
  • Potential exposure of sensitive data protected by downstream services.
  • Unauthorized actions carried out under the guise of another client or role.

General mitigation guidance

Mitigation focuses on strengthening authorization checks and enforcing the principle of least privilege in token exchange flows.

Common defensive patterns include:

  • Strictly binding subject tokens to their original client and rejecting exchanges from non-owning clients.
  • Enforcing that requested scopes and audiences during token exchange are a subset of those granted in the original token.
  • Applying audience and client-specific policies that restrict which clients may perform token exchanges and for which target resources.
  • Designing downstream services to validate scopes, audiences, and client identifiers independently rather than assuming upstream enforcement is sufficient.
  • Using conservative default configurations where cross-client token exchange is disabled or tightly whitelisted.

How teams detect issues like this

Detection typically involves reviewing both code and configuration around token exchange handling.

Useful approaches include:

  • Static or configuration analysis to ensure that token exchange logic enforces client binding and scope subset checks.
  • Code review checklists that explicitly ask how subject tokens, audiences, and scopes are validated for token exchange grants.
  • Logging and monitoring of token exchange events, including source client, subject token client, requested scopes, and target audiences, to spot anomalous privilege jumps.
  • Automated security tests that attempt token exchanges with mismatched clients or expanded scopes to verify defenses.

Sources

SourceLink
github.comgithub.com/zitadel/zitadel/commit/e2886a61670ca8fd41c9434f87036546e5620bcc
github.comgithub.com/zitadel/zitadel/releases/tag/v4.15.3
github.comgithub.com/zitadel/zitadel/security/advisories/GHSA-vrh8-c9cm-wh8v

Frequently asked

questions

Yes, it can be exploited remotely via the OAuth2 token endpoint, provided the attacker has a valid low-privilege token and client credentials capable of calling the token exchange grant.

The attacker needs at least a valid subject token with limited scopes and the ability to authenticate as an OAuth2 client allowed to invoke token exchange. From there, they may attempt to obtain broader scopes or access tokens for another application.

The safest pattern is to enforce strict authorization checks in the token exchange flow: ensure the subject token is owned by the requesting client, constrain requested scopes and audiences to subsets of the original token, and apply explicit policies for which clients may exchange tokens.

Future prevention involves designing token flows around least privilege, layering authorization checks in both the identity platform and downstream services, and routinely testing OAuth2/OIDC flows for cross-client privilege escalation, including automated negative tests for token exchange misuse.

Find out what's already
exploitable in your codebase.