CVE-2026-25766 Details
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.
A path traversal vulnerability has been identified in the Labstack Echo web framework, specifically in versions 5.0.0 through 5.0.2, when used on Windows with the default filesystem. The issue arises in the 'middleware.Static' component, where backslashes are not properly handled as path separators. This oversight allows unauthenticated remote users to read files outside the designated static root. The vulnerability occurs because 'path.Clean' does not interpret backslashes as separators, leaving '..' sequences intact. The cleaned path is then opened using 'os.Open', which on Windows, resolves these sequences, enabling traversal outside the static directory.
Users can upgrade to Labstack Echo version 5.0.3 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 19, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/labstack/echo/commit/b1d443086ea27cf51345ec72a71e9b7e9d9ce5f1 | [email protected] | Patch |
| https://github.com/labstack/echo/pull/2891 | [email protected] | Issue TrackingPatch |
| https://github.com/labstack/echo/security/advisories/GHSA-pgvm-wxw2-hrv9 | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| labstack echo | >= 5.0.0, < 5.0.3 |
CPE
Remediation
| |
| microsoft windows | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 23, 2026 | Initial Analysis | [email protected] |
| Feb 19, 2026 | New CVE Received | [email protected] |