/

CVE-2026-79662

Severity:

HIGH RISK

(8.0)

OAuth Redirect Validation (CWE-601) in Ech0 Auth API

CVE-2026-79662

Deferred

Vulnerability type

Category:

Open Redirect

CWE:

CWE-601

Impact:

Token Theft and Account Takeover

Severity:

HIGH RISK

(8.0)

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

Ech0 improperly validates OAuth redirect URIs by checking only their scheme and host, while ignoring path, query, and fragment components. An attacker may use an attacker-controlled path on an allowed host to receive a one-time authorization exchange code and, if that code leaks, exchange it for a victim's access and refresh tokens.

Affected context

The vulnerability occurs in Ech0's OAuth authentication flow when a client-supplied redirect_uri is accepted by parseAndValidateClientRedirect and later embedded in the signed state token. Deployments are at risk when the configured allowlist contains a host that can serve attacker-influenced paths, expose referrer data, or provide an open redirect, and when the resulting exchange code can reach an attacker.

Exploit preconditions

  • Attack surface: OAuth authorization and callback handling in the Ech0 authentication service
  • Required access: Ability to initiate or influence an OAuth authorization request with a crafted redirect URI; victim interaction is generally required
  • Trigger point: Redirect URI validation during login, followed by the OAuth exchange and callback redirect
  • Additional condition: The one-time exchange code must leak through a referrer, analytics system, open redirect, or comparable channel
  • Why exploitation is possible: Validation compares only scheme and host, allowing attacker-influenced path components to pass while the full URI is preserved for the post-authentication redirect

Why this happens

The underlying bug is incomplete redirect URI validation, mapping to CWE-601: URL Redirection to Untrusted Site. The implementation treats matching scheme and host as sufficient proof that the complete redirect destination is trusted, even though path, query, and fragment components can alter where sensitive callback data is delivered. Embedding the insufficiently validated URI into the signed state token preserves the unsafe destination through the authentication flow.

Potential impact

  • An attacker could obtain a victim's one-time OAuth exchange code
  • The leaked code could be exchanged for the victim's access and refresh tokens
  • A victim account could be compromised or impersonated
  • Unauthorized actions could be performed with the victim's privileges
  • Tokens or authentication metadata could be exposed through browser and telemetry channels

General mitigation guidance

Mitigation generally focuses on validating the complete redirect URI against an explicit, trusted allowlist rather than comparing only its origin.

Common defensive patterns include:

  • Require exact matching of approved scheme, host, port, path, and relevant URI components
  • Prefer registered, fixed callback endpoints over user-controlled redirect paths
  • Reject ambiguous, normalized, encoded, or otherwise non-canonical URI forms
  • Keep authorization codes out of destinations that may expose them to referrers or third-party scripts
  • Apply short lifetimes, single use, and strict client binding to authorization exchange codes
  • Limit token scope and service privileges according to least-privilege principles
  • Use browser and response policies that reduce referrer and unintended data disclosure

How teams detect issues like this

Detection can combine static analysis, code review, and runtime policy enforcement.

  • Search for redirect validation that compares only scheme, host, or origin without exact path validation
  • Review every location where redirect_uri is parsed, stored, signed, redirected, or returned to a browser
  • Flag OAuth callbacks that place authorization codes in destinations controlled by request data
  • Test allowlist enforcement with differing paths, ports, encoded characters, query strings, and fragments
  • Monitor exchange endpoints for unusual code redemption patterns, mismatched clients, or rapid redemption from unrelated locations
  • Enforce centralized OAuth redirect URI policies through CI checks and automated security review tools

Sources

SourceLink
github.comgithub.com/lin-snow/Ech0/security/advisories/GHSA-p64j-f4x9-wq66
vulncheck.comvulncheck.com/advisories/ech0-before-oauth-redirect-uri-validation-bypass

Frequently asked

questions

It can be triggered through a remotely initiated OAuth flow, but exploitation generally requires victim interaction and a way for the one-time exchange code to leak from the redirect destination.

The attacker typically needs to construct or influence an OAuth request and use a redirect path that passes the incomplete scheme-and-host check. Direct administrative access is not necessarily required.

Validate the complete redirect URI against a strict, normalized allowlist of registered callback endpoints, and avoid redirecting authentication artifacts to user-influenced paths.

Use exact redirect URI registration, treat all request-provided redirect data as untrusted, test unusual URI components, and monitor authorization-code exchange behavior.

Find out what's already
exploitable in your codebase.