CVE-2026-25766

NameCVE-2026-25766
DescriptionEcho 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
golang-github-labstack-echo (PTS)bookworm4.2.1-3fixed
forky, sid, trixie4.12.0-1fixed
golang-github-labstack-echo.v2 (PTS)bullseye2.2.0-2fixed
golang-github-labstack-echo.v3 (PTS)bullseye3.3.10-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
golang-github-labstack-echosource(unstable)(not affected)
golang-github-labstack-echo.v2source(unstable)(not affected)
golang-github-labstack-echo.v3source(unstable)(not affected)

Notes

- golang-github-labstack-echo <not-affected> (Windows-specific)
- golang-github-labstack-echo.v3 <not-affected> (Windows-specific)
- golang-github-labstack-echo.v2 <not-affected> (Windows-specific)
https://github.com/labstack/echo/security/advisories/GHSA-pgvm-wxw2-hrv9
https://github.com/labstack/echo/pull/2891
Fixed by (merge): https://github.com/labstack/echo/commit/b1d443086ea27cf51345ec72a71e9b7e9d9ce5f1 (v5.0.3)

Search for package or bug name: Reporting problems