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

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 41% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-17T18:53:58.000Z
- Modified: 2026-06-17T10:25:11.797Z
- Also known as: GHSA-pgvm-wxw2-hrv9, GO-2026-4502
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- labstack echo: >= 5.0.0, < 5.0.3; from 5.0.0 before 5.0.3
- github.com/labstack/echo/v5 (Go): from 5.0.0 before 5.0.3

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/labstack/echo/security/advisories/GHSA-pgvm-wxw2-hrv9> (exploit, advisory, vendor-advisory, web)
- <https://github.com/labstack/echo/pull/2891> (fix, issue-tracking, patch, web)
- <https://github.com/labstack/echo/commit/b1d443086ea27cf51345ec72a71e9b7e9d9ce5f1> (fix, patch, web)
- <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)

## Sources

- CVE List: [CVE-2026-25766](https://www.cve.org/CVERecord?id=CVE-2026-25766), CVE Terms of Use, modified 2026-02-19
- GitHub Advisory Database: [GHSA-pgvm-wxw2-hrv9](https://github.com/advisories/GHSA-pgvm-wxw2-hrv9), CC-BY-4.0, modified 2026-02-27
- Go Vulnerability Database: [GO-2026-4502](https://pkg.go.dev/vuln/GO-2026-4502), CC-BY-4.0, modified 2026-02-26
- NVD: [CVE-2026-25766](https://nvd.nist.gov/vuln/detail/CVE-2026-25766), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-25766 · Whole record: https://cve.day/CVE-2026-25766.json · Rebuilt by cve.day 2026-11-25T22:59:14.201Z
