CVEfocus › CVE database › CVE-2026-25766

CVE-2026-25766Echo has a Windows path traversal via backslash in middleware.Static default filesystem

CVSS 5.3 MediumEPSS 0.5% (higher than 39% of CVEs)Published 2026-02-19Updated 2026-02-19Assigner: GitHub_M

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.

CWE-22

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

1Fixed
5Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10golang-github-labstack-echoNot affected
vulnerable_code_not_present
Ubuntu 24.04golang-github-labstack-echoNot affected
vulnerable_code_not_present
Ubuntu 22.04golang-github-labstack-echoNot affected
vulnerable_code_not_present
Ubuntu 22.04golang-github-labstack-echo.v2Not affected
vulnerable_code_not_present
Ubuntu 22.04golang-github-labstack-echo.v3Not affected
vulnerable_code_not_present
Go librarygithub.com/labstack/echo/v5Fixed5.0.3GHSA-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.

References

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.