Description
Echo is a Go web framework. Prior to 4.15.2 and 5.1.1, Context.Scheme returns values from X-Forwarded-Proto, X-Forwarded-Protocol, or X-Url-Scheme without validating that they are supported web schemes. WWWRedirect and NonWWWRedirect use that value to construct a Location header, so an attacker controlling a forwarded scheme header can cause a redirect to use an arbitrary URI scheme. Exploitation requires an affected redirect middleware and user interaction with the response; the HTTPS-specific redirect variants hardcode HTTPS and are unaffected. This issue is fixed in 4.15.2 and 5.1.1.
Published: 2026-10-28
Score: 4.7 Medium
EPSS: n/a
KEV: No
Impact: Open redirect via arbitrary URI scheme
Action: Apply patch
AI Analysis

Impact

Echo is a Go web framework that builds redirect URLs using the scheme value from forwarded headers such as X-Forwarded-Proto, X-Forwarded-Protocol, or X-Url-Scheme. Before version 4.15.2 and 5.1.1, the framework does not validate that these headers contain supported web schemes. Consequently, an attacker who can control these headers can force the redirection middleware to generate a Location header with any URI scheme, including non‑HTTP schemes such as mailto: or other custom protocols. An unsuspecting user following the redirect would then be directed to a malicious endpoint, creating an open redirect vector that can be exploited for phishing or other social‑engineering attacks. This vulnerability is a classic CWE‑601 open redirect flaw.

Affected Systems

The flaw exists in Echo releases earlier than 4.15.2 and 5.1.1, affecting all deployments that use the WWWRedirect or NonWWWRedirect middlewares and rely on forwarded scheme headers. The issue is fixed in the cited release tags, so any component that has not been updated to at least those versions is vulnerable. Systems that do not employ these middlewares or that use the HTTPS‑specific redirect variants are not impacted.

Risk and Exploitability

The CVSS score of 4.7 indicates a moderate severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Based on the description, the likely attack vector is remote header injection through HTTP proxies or load balancers that set forwarded scheme headers. Exploitation requires an affected redirect middleware and user interaction with the malicious redirect response. Because the attack relies on user click‑through, the impact is primarily a social‑engineering risk rather than a direct compromise of the server itself.

Generated by OpenCVE AI on October 28, 2026 at 21:37 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Echo to version 4.15.2 or later, or 5.1.1 or later, ensuring the redirect middleware is patched.
  • Modify the application configuration to explicitly whitelist allowed URI schemes when constructing redirects, preventing acceptance of arbitrary schemes.
  • If forwarded scheme headers are not required, disable proxy header trust or remove the ability to set X-Forwarded-Proto, X-Forwarded-Protocol, and X-Url-Scheme in the request pipeline.

Generated by OpenCVE AI on October 28, 2026 at 21:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-23wf-92cp-8pcj Echo has Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto
History

Wed, 28 Oct 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Labstack
Labstack echo
Vendors & Products Labstack
Labstack echo

Wed, 28 Oct 2026 20:30:00 +0000

Type Values Removed Values Added
Description Echo is a Go web framework. Prior to 4.15.2 and 5.1.1, Context.Scheme returns values from X-Forwarded-Proto, X-Forwarded-Protocol, or X-Url-Scheme without validating that they are supported web schemes. WWWRedirect and NonWWWRedirect use that value to construct a Location header, so an attacker controlling a forwarded scheme header can cause a redirect to use an arbitrary URI scheme. Exploitation requires an affected redirect middleware and user interaction with the response; the HTTPS-specific redirect variants hardcode HTTPS and are unaffected. This issue is fixed in 4.15.2 and 5.1.1.
Title Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto
Weaknesses CWE-601
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-28T20:17:11.083Z

Reserved: 2026-10-28T17:25:37.561Z

Link: CVE-2026-118658

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-28T21:16:55.827

Modified: 2026-10-28T21:16:55.827

Link: CVE-2026-118658

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-28T22:45:15Z

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')