CVE-2026-118658

GHSA-23wf-92cp-8pcj · GO-2026-6878 · published 28 Oct 2026 · updated 16 Nov 2026

Echo: Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-Proto

4.7MediumCVSS 4.7EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in github.com/labstack/echo/v4 4.15.2 and github.com/labstack/echo/v5 5.1.1.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
labstack<4.15.2, >=5.0.0 <5.1.1
go: github.com/labstack/echo/v4<4.15.24.15.2
go: github.com/labstack/echo/v5<5.1.15.1.1

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in github.com/labstack/echo/v4 (Go), strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2026-118658 severity on Zeptric[![CVE-2026-118658](https://zeptric.io/badge/cve/CVE-2026-118658.svg)](https://zeptric.io/cve/CVE-2026-118658)