Skip to main content
VulnerabilityPublished

CVE-2026-25766: labstack echo · Path Traversal

Affects labstack echoSource CVE Database V5

0

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

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 19 Feb 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
labstackechoAffected
  • >=5.0.0 <5.0.3
Fixed in
  • 5.0.3

AI-suggested

  1. Upgrade Echo to version 5.0.3 or later, where this vulnerability is fixed.
  2. 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 '..//'.
  3. Configure the web server or reverse proxy to restrict access to sensitive directories and files outside the static root.
  4. Use a custom filesystem implementation or middleware that properly normalizes paths considering Windows path separators before file access.
  5. Employ runtime application self-protection (RASP) or web application firewalls (WAFs) with rules to detect and block path traversal attempts involving backslashes.
  6. Conduct thorough security reviews of static file serving configurations and ensure sensitive files are not stored within or accessible from the static root directory.
  7. 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.

References

Community reviews

Loading reviews…