Use of Non-Canonical URL Paths for Authorization Decisions Affecting github.com/labstack/echo/v4/middleware package, versions <4.16.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.4% (34th 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 IDSNYK-GOLANG-GITHUBCOMLABSTACKECHOV4MIDDLEWARE-21817873
  • published29 Oct 2026
  • disclosed28 Oct 2026
  • creditAdobodoo, manus-use,, kta1kri, zerovulnlabs, benzdeus

Introduced: 28 Oct 2026

NewCVE-2026-118650  (opens in a new tab)
CWE-177  (opens in a new tab)
CWE-647  (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 Use of Non-Canonical URL Paths for Authorization Decisions via the Static middleware in middleware/static.go. When Static is attached to a catch-all route alongside a guarded route, an attacker can request an in-root file using an encoded separator, such as /admin%2Fsecret.txt; routing misses the guarded route while Static resolves the decoded URL path and serves the file. When Static is mounted globally with Echo#Use, it runs before route and group middleware, so those guards do not protect even literal static paths.

Workarounds

  • Keep files that need protection outside the middleware.Static root directory to prevent the middleware from serving them without the intended access controls.

CVSS Base Scores

version 4.0
version 3.1