/

CVE-2026-136120

Severity:

HIGH RISK

(8.1)

CSRF (CWE-352) in Ziit Epilogue OAuth Callback Handler

CVE-2026-136120

Received

Vulnerability type

Category:

Cross-Site Request Forgery (CSRF)

CWE:

CWE-352

Impact:

Account takeover through OAuth flow manipulation

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

Ziit's Epilogue OAuth callback accepts requests without validating an OAuth state parameter, which can let a cross-site request interfere with the account-linking flow. If a signed-in victim is lured into completing that flow with an attacker's authorization code, the attacker may be able to sign in as the victim.

Affected context

The issue is in Ziit's /api/auth/epilogue/callback handler. It is risky when the handler processes an OAuth callback without requiring a valid state value tied to the initiating user session, and a signed-in user can be induced to visit attacker-controlled content.

Exploit preconditions

  • Attack surface: The Epilogue OAuth callback endpoint.
  • Required access: The victim must be signed in to Ziit; the attacker needs an Epilogue authorization code and a way to lure the victim to a cross-site page.
  • Trigger point: The victim's browser sends a request that completes the OAuth link flow.
  • Why exploitation is possible: The callback accepts requests without the OAuth state parameter, so it cannot reliably verify that the flow was initiated by the victim's session.

Why this happens

The callback does not require and validate an OAuth state value that is unpredictable, associated with the initiating session, and checked when the response returns. This is a CSRF weakness (CWE-352): the application processes a state-changing request without adequately verifying that it was intentionally initiated by the signed-in user. In an OAuth flow, missing state validation can also allow responses to be associated with the wrong session.

Potential impact

  • An attacker may complete an OAuth linking flow in a victim's session.
  • The attacker could gain the ability to sign in as the victim.
  • The victim's account and data may be exposed to unauthorized access.

General mitigation guidance

Defensive patterns include requiring a high-entropy OAuth state value for every flow, binding it to the initiating session, and rejecting missing, mismatched, or reused values. Treat callback parameters as untrusted, validate the response before changing account state, and use secure session-cookie settings as an additional layer rather than a replacement for state validation. Apply least privilege to linked identities and provide users with ways to review and revoke account connections.

How teams detect issues like this

  • Review OAuth callback code for missing, optional, or incomplete state validation.
  • Use static analysis and code-review checks to flag state-changing handlers that do not verify request origin or session intent.
  • Add automated tests for absent, mismatched, expired, and reused state values.
  • Monitor authentication and account-linking events for unexpected callback sequences or newly linked identities.
  • Enforce policies requiring documented CSRF protections for OAuth callbacks and other state-changing endpoints.

Sources

SourceLink
github.comgithub.com/0PandaDEV/Ziit/blob/v1.3.2/server/api/auth/epilogue/callback_get.rs#L131-L140
github.comgithub.com/0PandaDEV/Ziit/commit/0ec429e43cac9f176c0df69f19c4299b319f4396
github.comgithub.com/0PandaDEV/Ziit/releases/tag/v1.3.3
github.comgithub.com/0PandaDEV/Ziit/security/advisories/GHSA-qr98-h3w2-vw42
vulncheck.comvulncheck.com/advisories/ziit-1.3.2-csrf-account-takeover-via-epilogue-oauth-callback-missing-state

Frequently asked

questions

The attack can be initiated from cross-site content, but it depends on a signed-in victim's browser reaching the callback as part of the OAuth flow.

The attacker does not need the victim's credentials, but the victim must be signed in and induced to complete the flow. The attacker also needs an Epilogue authorization code.

Require a unique state value bound to the user's session and validate it before processing the OAuth callback or changing account state.

Apply consistent CSRF protections to state-changing endpoints, test OAuth flows against missing or invalid state, and review account-linking behavior as part of security testing.

Find out what's already
exploitable in your codebase.