Echo has a Windows path traversal via backslash in middleware.Static default filesystem
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- Low · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-22 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| labstack | echo | 5.0.0 to before 5.0.3 | 5.0.3 | Patch available | CNA |
| — | github.com/labstack/echo/v5 (Go) | 5.0.0 to before 5.0.3 | 5.0.3 | Patch available | GHSA-pgvm-wxw2-hrv9 |
- echo Vendorlabstack Affected 5.0.0 to before 5.0.3 Fixed in 5.0.3 Patch available CNA
- github.com/labstack/echo/v5 (Go) Vendor— Affected 5.0.0 to before 5.0.3 Fixed in 5.0.3 Patch available GHSA-pgvm-wxw2-hrv9
Remediation
- Fix · CNA echo (labstack) Fixed in 5.0.3
- Fix · GHSA-pgvm-wxw2-hrv9 github.com/labstack/echo/v5 (Go) Fixed in 5.0.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-25766
- 2026-10-03 Alias added: GHSA-pgvm-wxw2-hrv9
References
Patch 2
More labstack Echo vulnerabilities
- TI-2022-18981 Labstack Echo v4.8.0 was discovered to contain an open redirect vulnerability via the… CVSS 3.1CRITICAL 9.6
- TI-2020-18793 Directory traversal on Windows in github.com/labstack/echo/v4 CVSS 3.1MEDIUM 5.3
Sources
- CVE-2026-25766 · CVE Program
- CVE-2026-25766 · NVD
- FIRST EPSS
- GHSA-pgvm-wxw2-hrv9 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences