CVE-2026-25766Echo has a Windows path traversal via backslash in middleware.Static default filesystem
Echo is a Go web framework. In versions 5.0.0 through 5.0.2 on Windows, Echo’s `middleware.Static` using the default filesystem allows path traversal via backslashes, enabling unauthenticated remote file read outside the static root. In `middleware/static.go`, the requested path is unescaped and normalized with `path.Clean` (URL semantics). `path.Clean` does not treat `\` as a path separator, so `..\` sequences remain in the cleaned path. The resulting path is then passed to `currentFS.Open(...)`. When the filesystem is left at the default (nil), Echo uses `defaultFS` which calls `os.Open` (`echo.go:792`). On Windows, `os.Open` treats `\` as a path separator and resolves `..\`, allowing traversal outside the static root. Version 5.0.3 fixes the issue.
What to do
Fixed builds are available from Go: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 25.10 | golang-github-labstack-echo | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | golang-github-labstack-echo | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | golang-github-labstack-echo | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | golang-github-labstack-echo.v2 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | golang-github-labstack-echo.v3 | Not affected vulnerable_code_not_present | ||
| Go library | github.com/labstack/echo/v5 | Fixed | 5.0.3 | GHSA-pgvm-wxw2-hrv9 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- labstack echo: affected: >= 5.0.0, < 5.0.3
References
- https://github.com/labstack/echo/security/advisories/GHSA-pgvm-wxw2-hrv9
- https://github.com/labstack/echo/pull/2891
- https://github.com/labstack/echo/commit/b1d443086ea27cf51345ec72a71e9b7e9d9ce5f1
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.