CVE-2026-25766
MEDIUM 5.3CVSS 3.1Echo 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.
- Published
- 19 Feb 2026
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-22
- Also known as
- GHSA-pgvm-wxw2-hrv9GO-2026-4502
- Sources
- NVDJSONOSV GHSA-pgvm-wxw2-hrv9JSONOSV GO-2026-4502JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | labstack | echocpe:2.3:a:labstack:echo:*:*:*:*:*:go:*:* |
>= 5.0.0, < 5.0.3 | 5.0.3 |
| OSV | Go | github.com/labstack/echo/v5 | >= 5.0.0, < 5.0.3 | 5.0.3 |
References
- https://github.com/labstack/echo/commit/b1d443086ea27cf51345ec72a71e9b7e9d9ce5f1 · Patch, WEB, FIX
- https://github.com/labstack/echo/pull/2891 · Issue Tracking, Patch, WEB, FIX
- https://github.com/labstack/echo/security/advisories/GHSA-pgvm-wxw2-hrv9 · Exploit, Vendor Advisory, WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-25766 · ADVISORY
- https://github.com/labstack/echo · PACKAGE
- https://pkg.go.dev/vuln/GO-2026-4502 · WEB
History
- 25 Nov 2026 21:01 UTC · NVD: first stored (published 19 Feb 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 Feb 2026)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 17 Feb 2026)