Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/lin-snow/ech0
  4. ›
  5. GHSA-p64j-f4x9-wq66

GHSA-p64j-f4x9-wq66: Ech0's OAuth redirect URI validation ignores path component, enables exchange-code theft

May 7, 2026

parseAndValidateClientRedirect at internal/service/auth/auth.go:448 validates OAuth client-redirect URIs by comparing only scheme and host against the admin-configured allowlist. Path, query, and fragment are ignored. The initiator at /oauth/:provider/login embeds the caller-supplied redirect_uri verbatim into the signed state JWT without any validation at login time. Alice submits a crafted redirect_uri whose host matches an allowed origin but whose path points to any page on that host. After the provider exchange, Ech0 redirects the victim to the attacker-chosen path with the one-time exchange code in the query string. If the chosen path leaks the URL via Referer, analytics, or an open redirect, the attacker trades the code at POST /api/auth/exchange for the victim’s access and refresh tokens. RFC 6749 §3.1.2 requires exact redirect URI matching.

References

  • github.com/advisories/GHSA-p64j-f4x9-wq66
  • github.com/lin-snow/Ech0/commit/a7e8b8e84bd1e3db090dfb720f2c6c433356b442
  • github.com/lin-snow/Ech0/security/advisories/GHSA-p64j-f4x9-wq66

Code Behaviors & Features

Detect and mitigate GHSA-p64j-f4x9-wq66 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.4.8-0.20260503040728-a7e8b8e84bd1

Fixed versions

  • 1.4.8-0.20260503040728-a7e8b8e84bd1

Solution

Upgrade to version 1.4.8-0.20260503040728-a7e8b8e84bd1 or above.

Impact 8 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-1173: Improper Use of Validation Framework
  • CWE-601: URL Redirection to Untrusted Site ('Open Redirect')

Source file

go/github.com/lin-snow/ech0/GHSA-p64j-f4x9-wq66.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:21 +0000.