CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-P64J-F4X9-WQ66

GHSA-P64J-F4X9-WQ66: OAuth Redirect URI Path Truncation in Ech0 Leads to Authorization Code Theft

Alon Barad
Alon Barad
Software Engineer

May 7, 2026·6 min read·14 visits

Executive Summary (TL;DR)

Improper validation of OAuth redirect URIs in Ech0 allows attackers to append malicious paths to trusted domains. Exploitation leads to the theft of authorization exchange codes and full account takeover.

The Ech0 lightweight publishing platform contains a critical vulnerability in its OAuth 2.0 implementation where redirect URI validation ignores the path component. This oversight permits attackers to route authenticated victims to malicious endpoints on trusted domains, resulting in the theft of authorization codes and subsequent account takeover.

Vulnerability Overview

Ech0 is a self-hosted lightweight publishing platform utilizing OAuth 2.0 for user authentication and authorization. The platform relies on an administrator-defined allowlist to restrict authorized callback endpoints during the OAuth flow. This mechanism restricts malicious actors from redirecting authenticated users to untrusted destinations and stealing their session tokens.

A vulnerability identified as GHSA-P64J-F4X9-WQ66 exists within the parseAndValidateClientRedirect function of the authentication service. The validation logic improperly verifies the redirect_uri parameter by only checking the scheme and host components of the requested URL. The implementation completely ignores the path, query, and fragment components during the validation sequence.

This flaw violates RFC 6749 §3.1.2, which mandates exact string matching for redirection endpoints to maintain security boundaries. The vulnerability allows an attacker to supply a crafted redirect_uri targeting a malicious path or open redirect on a trusted domain. Successful exploitation leads to the exposure of one-time authorization codes, enabling full account takeover.

Root Cause Analysis

The root cause resides in the custom URL parsing and validation logic implemented within internal/service/auth/auth.go. When an OAuth flow initiates, the application extracts the redirect_uri parameter and compares it against an array of permitted URLs defined in the application configuration. The developers implemented a partial comparison strategy instead of an exact string match.

The logic extracts the Scheme and Host properties from the parsed URL object and uses strings.EqualFold to perform a case-insensitive comparison against the permitted URL. If both components match, the function sets a boolean flag to true, approving the redirection attempt. The code drops the Path, RawQuery, and Fragment properties during this evaluation.

This structural oversight creates a significant security gap when the whitelisted domain hosts unauthenticated user-generated content, open redirects, or third-party analytical scripts. An attacker constructs a URI containing a trusted domain and an untrusted path, satisfying the validation constraints while directing the final application flow to a hostile endpoint.

Code Analysis

An examination of the pre-patch source code reveals the precise nature of the logical flaw in the validation routine. The original implementation relied solely on scheme and host comparisons without analyzing the remaining URI segments.

// Pre-patch implementation in internal/service/auth/auth.go
if strings.EqualFold(redirectURL.Scheme, allowURL.Scheme) &&
   strings.EqualFold(redirectURL.Host, allowURL.Host) {
    matched = true
}

The patch introduced in commit a7e8b8e84bd1e3db090dfb720f2c6c433356b442 addresses this oversight by constructing normalized strings that incorporate the path component. The updated logic concatenates the lowercased scheme, host, and case-sensitive path before performing an exact string comparison.

// Post-patch implementation
redirectNorm := strings.ToLower(redirectURL.Scheme) + "://" +
    strings.ToLower(redirectURL.Host) + redirectURL.Path
allowNorm := strings.ToLower(allowURL.Scheme) + "://" +
    strings.ToLower(allowURL.Host) + allowURL.Path
 
if redirectNorm == allowNorm {
    matched = true
}

The developers also refactored the BindOAuth and GetOAuthLoginURL functions to enforce early validation. The patched application now verifies the requested redirection URI before generating and signing the state JWT. This structural change prevents the application from minting cryptographic tokens containing malicious payload data, eliminating the core exploitation primitive.

Exploitation Methodology

Exploitation of this vulnerability requires the attacker to construct a crafted OAuth authorization link and deliver it to a target user. The attacker sets the redirect_uri parameter to a hostile path on a permitted domain, such as an open redirect endpoint or a page containing third-party tracking scripts.

When the victim initiates the OAuth flow, the Ech0 server validates the truncated URI, generates a signed state JSON Web Token containing the complete malicious URI, and forwards the victim to the Identity Provider. After successful authentication, the Identity Provider redirects the victim back to the Ech0 callback endpoint, appending an authorization code and the unaltered state parameter.

The Ech0 server receives the callback, decodes the state token, and trusts the embedded redirect_uri because it carries a valid cryptographic signature generated by the server. The application then issues an HTTP 302 redirection, sending the victim and their authorization code to the attacker-controlled path. The attacker subsequently extracts the code via Referer header leakage or by capturing traffic from an open redirect chain.

Impact Assessment

The primary impact of this vulnerability is complete account takeover through authorization code theft. The stolen code allows the attacker to finalize the OAuth flow independently, binding their session to the victim's identity within the Ech0 platform.

An attacker exploiting this flaw gains unauthorized access to all application functions available to the compromised user. For a lightweight publishing platform, this access permits the unauthorized publication of articles, modification of existing content, and extraction of private data. If the victim holds administrative privileges, the attacker achieves total control over the platform.

The attack relies on specific environmental prerequisites to succeed. The attacker must identify an exploitable path on the trusted domain, and the victim must interact with the crafted link while holding an active session with the Identity Provider. Despite these constraints, the vulnerability presents a severe risk due to the complete circumvention of the application's authentication boundary.

Remediation and Mitigation

The primary remediation strategy requires updating the Ech0 application to a version containing commit a7e8b8e84bd1e3db090dfb720f2c6c433356b442. Administrators must ensure the deployment utilizes the latest upstream code repository to mitigate the vulnerability effectively.

Application administrators should conduct a comprehensive audit of the Auth.Redirect.AllowedReturnURLs configuration setting. The whitelist must exclusively contain explicit, trusted endpoints necessary for operational requirements. Removing domains that host user-generated content or unauthenticated redirectors reduces the attack surface significantly.

Security teams can implement Web Application Firewall rules to detect and block incoming OAuth requests containing unexpected paths in the redirect_uri parameter. Furthermore, administrators should monitor server access logs for anomalous callback URIs, specifically searching for anomalies in the state parameter processing during authentication events.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.1/ 10

Affected Systems

Ech0 open-source publishing platform

Affected Versions Detail

Product
Affected Versions
Fixed Version
Ech0
lin-snow
< a7e8b8e84bd1e3db090dfb720f2c6c433356b442a7e8b8e84bd1e3db090dfb720f2c6c433356b442
AttributeDetail
CWE IDCWE-601
Attack VectorNetwork
CVSS Score8.1 (High)
ImpactAccount Takeover via Code Theft
Exploit StatusProof of Concept
Authentication RequiredNone

MITRE ATT&CK Mapping

T1550.001Use Alternate Authentication Material: Application Access Token
Defense Evasion
T1566Phishing
Initial Access
CWE-601
URL Redirection to Untrusted Site ('Open Redirect')

Improper validation of URL components enables attackers to redirect users to malicious paths on trusted domains.

Known Exploits & Detection

GitHub AdvisoryExploitation steps detailing URI poisoning and referer leakage.

Vulnerability Timeline

Patch Committed
2026-05-03

References & Sources

  • [1]GitHub Security Advisory: GHSA-P64J-F4X9-WQ66
  • [2]Ech0 Patch Commit a7e8b8e84bd
  • [3]Ech0 GitHub Repository
  • [4]RFC 6749 Section 3.1.2

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 4 hours ago•GHSA-4CC2-G9W2-FHF6
5.9

GHSA-4cc2-g9w2-fhf6: Server-Side Request Forgery in python-zeep via Transitive Schema Resolution

A regression in python-zeep (versions 4.0.0 through 4.3.2) silently ignores the security configuration designed to block transitive external resource fetches during WSDL and XSD parsing. This defect exposes applications to Server-Side Request Forgery (SSRF) when loading untrusted schemas.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 6 hours ago•CVE-2026-11941
5.6

CVE-2026-11941: Use-After-Free Vulnerabilities in Cloudflare Quiche FFI Layer

Two critical use-after-free vulnerabilities exist within the Foreign Function Interface (FFI) layer of Cloudflare Quiche, affecting connection ID iterator functions. These flaws occur because raw pointers are returned to C callers pointing to temporary, owned Rust values that are immediately dropped and deallocated upon function exit. This leads to undefined behavior, potential limited heap information disclosure, or application crashes when integrating applications dereference these dangling pointers.

Alon Barad
Alon Barad
5 views•7 min read
•about 6 hours ago•GHSA-C3XH-98XP-6QHF
7.1

GHSA-C3XH-98XP-6QHF: Command Injection via Issue Title in Discord Notification Workflow

A command injection vulnerability exists in the .github/workflows/discord-issue.yml workflow of the gouef/githubtoplanguages repository. By exploiting literal string interpolation of untrusted issue titles into an inline Bash script, an attacker can execute arbitrary code within the GitHub Actions runner environment. This exposure risks the theft of repository secrets such as the Discord webhook URL.

Alon Barad
Alon Barad
5 views•5 min read
•about 7 hours ago•GHSA-F4XH-W4CJ-QXQ8
7.7

GHSA-F4XH-W4CJ-QXQ8: Arbitrary Server-Side File Read in LangSmith SDK TracingMiddleware

The LangSmith Python SDK TracingMiddleware is vulnerable to an arbitrary server-side file read. Due to origin validation and type confusion flaws, external inputs parsed from distributed tracing headers bypass local filesystem read protections, allowing remote attackers to silently exfiltrate arbitrary server files to the telemetry dashboard.

Alon Barad
Alon Barad
5 views•6 min read
•1 day ago•GHSA-H5X8-XP6M-X6Q4
7.1

GHSA-H5X8-XP6M-X6Q4: Unvalidated Signature Generation in @jhb.software/payload-cloudinary-plugin

The @jhb.software/payload-cloudinary-plugin exposes an endpoint that performs unvalidated cryptographic signing of Cloudinary API parameters, allowing authenticated users with minimal privileges to forge valid signatures for arbitrary actions. This flaw allows attackers to overwrite remote storage assets, execute unauthorized file uploads, alter asset visibility parameters, trigger SSRF webhooks, and perform directory traversal within Cloudinary repositories.

Alon Barad
Alon Barad
3 views•6 min read
•1 day ago•GHSA-G2GW-Q38M-VJFC
8.7

GHSA-G2GW-Q38M-VJFC: Server-Side Request Forgery and Bearer Token Exfiltration in @merill/lokka

A Server-Side Request Forgery (SSRF) and Bearer Token Exfiltration vulnerability exists in the @merill/lokka (Lokka) Model Context Protocol (MCP) server prior to version 2.1.2. The server constructed Azure Resource Manager request URLs by concatenating user-controlled path parameters directly into destination request strings. By injecting authority-redefinition characters, an attacker can manipulate URL parsing to execute a host-escape attack, forcing the server to send high-privilege Azure Resource Manager (ARM) Bearer tokens to an external attacker-controlled host. This allows complete administrative access to the associated Azure subscriptions.

Alon Barad
Alon Barad
6 views•7 min read