Echo: Encoded slash (%2F) bypasses route-level protection and exposes static files
labstack echo
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/labstack/echo/v5 Go |
|
|
| github.com/labstack/echo/v4 Go |
|
|
| github.com/labstack/echo Go |
| No fix yet |
Original description
Echo is a Go web framework. Prior to 4.15.3 and 5.2.0, Echo's router and static file handler disagree on URL path decoding. The router matches routes using the raw encoded path (preserving %2F as-is), while StaticDirectoryHandler unescapes %2F to / before resolving filesystem paths. This allows an attacker to bypass route-level access controls and read static files without authorization. This vulnerability is fixed in 4.15.3 and 5.2.0.
From the CVE record · GitHub_M
References
- github.com/labstack/echo/security/advisories/GHSA-vfp3-v2gw-7wfqExploit
- github.com/CVEProject/cvelistV5/tree/main/cves/2026/55xxx/CVE-2026-55677.json
- nvd.nist.gov/vuln/detail/CVE-2026-55677
- github.com/labstack/echo/pull/3009
- github.com/labstack/echo/pull/3011
- github.com/labstack/echo/commit/8d1ae9d3360a71672418856d58753af25f2c3986
- github.com/labstack/echo/commit/c3fa2a27ff92b2b8db360de614f999ef1da24725
- github.com/labstack/echo
- github.com/labstack/echo/releases/tag/v4.15.3
- github.com/labstack/echo/releases/tag/v5.2.0