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


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.2% (10th 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-GITHUBCOMLABSTACKECHOV4MIDDLEWARE-21817651
  • published29 Oct 2026
  • disclosed28 Oct 2026
  • creditzerovulnlabs

Introduced: 28 Oct 2026

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

How to fix?

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

Overview

github.com/labstack/echo/v4/middleware is a middleware package for echo.

Affected versions of this package are vulnerable to Open Redirect via the sanitizeURI function in the trailing-slash middleware and static directory redirects. An attacker can request a path such as /%09/attacker.example/x/; when a redirect is generated, the decoded tab between the slash separators lets the target pass the fixed-position check unchanged, and the browser strips the tab and navigates to attacker.example. Users who follow the redirect leave the trusted site for an attacker-chosen site.

Workarounds

  • Configure the trailing-slash middleware without RedirectCode so it rewrites paths internally instead of issuing the vulnerable redirect.
  • Reject request paths containing control characters before the trailing-slash middleware runs, blocking control-character-prefixed redirect targets.

CVSS Base Scores

version 4.0
version 3.1