Echo guarded route bypass in static file middleware
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.15.3 and 5.2.0, middleware.Static can decode an already decoded Request.URL.Path a second time. Double-encoded separators can consequently be reconstructed before filesystem resolution. This can reach a file under a guarded route when the static middleware is registered globally. This issue is fixed in 4.15.3 and 5.2.0.
From the CVE record · GitHub_M
Echo's middleware.Static can decode an already decoded request path a second time, reconstructing double-encoded separators before filesystem resolution. A remote requester can reach a file under a guarded route when static middleware is registered globally. The input does not specify whether authentication or user interaction is required.
Check Go applications using github.com/labstack/echo/v4 before 4.15.3 or github.com/labstack/echo/v5 before 5.2.0.