Echo protected file exposure in static file routing
labstack echo
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/labstack/echo/v5 Go |
|
|
| github.com/labstack/echo/v4 Go |
|
|
labstack echo
| Product | Affected | Fixed in |
|---|---|---|
| github.com/labstack/echo/v5 Go |
|
|
| github.com/labstack/echo/v4 Go |
|
|
Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Echo's static file handlers can normalize dot segments after route matching and serve a file through a public static route even though the corresponding direct path is protected by route-level middleware. An unauthenticated attacker can read files that an application intended to protect with route-level middleware, when those files are also reachable through a static filesystem mount after path normalization. This vulnerability is the result of an incomplete fix for CVE-2026-55677. This issue is fixed in 4.16.0 and 5.4.0.
From the CVE record · GitHub_M
Echo's static file handlers can normalize dot segments after route matching, allowing a public static route to serve a file whose direct path is protected by route-level middleware. An unauthenticated remote attacker can read such files when they are also reachable through a static filesystem mount after path normalization.
Teams using Go package github.com/labstack/echo/v4 before 4.16.0 or github.com/labstack/echo/v5 before 5.4.0 should check their applications.