CVE-2026-25766: labstack echo · Path Traversal
Affects labstack echoSource CVE Database V5
Not known to be exploited · CVSS 5.3 Medium : upgrade to 5.0.3 when convenient.
Data as of 26 Oct 2026, 14:05 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 32% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 5.0.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 19 Feb 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade labstack echo to 5.0.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| labstackecho | Affected
| Fixed in
|
AI-suggested
- Upgrade Echo to version 5.0.3 or later, where this vulnerability is fixed.
- If immediate upgrade is not possible, implement strict input validation and sanitization on all static file requests to reject any paths containing backslashes or traversal sequences such as '..\\' or '..//'.
- Configure the web server or reverse proxy to restrict access to sensitive directories and files outside the static root.
- Use a custom filesystem implementation or middleware that properly normalizes paths considering Windows path separators before file access.
- Employ runtime application self-protection (RASP) or web application firewalls (WAFs) with rules to detect and block path traversal attempts involving backslashes.
- Conduct thorough security reviews of static file serving configurations and ensure sensitive files are not stored within or accessible from the static root directory.
- Monitor logs for suspicious requests containing traversal patterns and respond promptly to potential exploitation attempts.
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.