Skip to content
OpenAdvisories
Medium · 4.7 CVE-2026-118658 EUVD-2026-112465GHSA-23wf-92cp-8pcjGO-2026-6878

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

Published Oct 28, 2026 · Updated Nov 2, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
labstack echo >= 5.0.0, < 5.1.1, < 4.15.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 golang-github-labstack-echo No fix yet —
Debian 13 golang-github-labstack-echo No fix yet —
Debian 12 golang-github-labstack-echo No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 golang-github-labstack-echo No fix yet —
Ubuntu 26.04 LTS golang-github-labstack-echo No fix yet —
Ubuntu 24.04 LTS golang-github-labstack-echo No fix yet —
Ubuntu 22.04 LTS golang-github-labstack-echo +2 No fix yet —
Ubuntu 20.04 LTS golang-github-labstack-echo.v2 +1 No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/labstack/echo/v4 < 4.15.2 4.15.2 GHSA-23wf-92cp-8pcj
Go github.com/labstack/echo/v5 < 5.1.1 5.1.1 GHSA-23wf-92cp-8pcj

References