Open Redirect Affecting github.com/labstack/echo/v4 package, versions <4.15.2


Severity

Recommended
0.0
low
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.19% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Open Redirect vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMLABSTACKECHOV4-21817609
  • published29 Oct 2026
  • disclosed28 Oct 2026
  • creditUnknown

Introduced: 28 Oct 2026

NewCVE-2026-118658  (opens in a new tab)
CWE-601  (opens in a new tab)

How to fix?

Upgrade github.com/labstack/echo/v4 to version 4.15.2 or higher.

Overview

Affected versions of this package are vulnerable to Open Redirect via the Scheme method in the Context component. An attacker can cause WWWRedirect(), NonWWWRedirect(), and their WithConfig variants to place an attacker-chosen URI scheme in the Location header by sending a request with a crafted X-Forwarded-Proto, X-Forwarded-Protocol, or X-Url-Scheme header that the application or proxy does not remove or overwrite. Users who follow the redirect may be sent to a malicious destination or a non-web scheme, and cached redirects may affect other users when a CDN caches them by path.

Notes

  • At scheme resolution, Context.Scheme() returns https immediately when Echo sees the request as TLS; the forwarded-header injection path therefore requires a request that is non-TLS as seen by Echo.

Workarounds

  • Configure the edge proxy to overwrite or remove the X-Forwarded-Proto, X-Forwarded-Protocol, and X-Url-Scheme request headers so attacker-supplied schemes cannot reach Echo’s redirect middleware.

CVSS Base Scores

version 4.0
version 3.1