Go
CVE-2026-118655
Echo has a Static Middleware Double-Unescape Path Traversal
- Severity
- Medium 5.9
- Published
- 28 Oct 2026
- Last changed
- 5 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 4.15.3, 5.2.0
- Exploit chance
- 0.3% in the next 30 daysHigher than 23% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- CWE-174
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N- Also known as
- GHSA-xwq5-6cqp-vx96, GO-2026-6885
- Sources
- OSV.dev and GitHub
Description
Commit a9ede66a (PR #3006, issue #2599) silently fixed a path traversal vulnerability in the Echo web framework's static file middleware.
The static middleware double-unescaped URL paths. Go's net/http already decodes Request.URL.Path, but middleware/static.go unconditionally called url.PathUnescape() again:
This reassembled path traversal sequences from double-encoded input. An attacker could send GET /%2e%2e%2fsecret.txt or /..%252fsecret.txt and the double-unescape would produce ../secret.txt.
Arbitrary file read from server filesystem via percent-encoded path traversal.
Workarounds
Keep files that need protection outside the Static middleware's root directory.
Affected software
| Software | Affected versions |
|---|---|
github.com/labstack/echo/v4Go · osv:Go:github.com/labstack/echo/v4 |
|
github.com/labstack/echo/v5Go · osv:Go:github.com/labstack/echo/v5 |
|
About github.com/labstack/echo/v4
Vulnerabilities in github.com/labstack/echo/v4
- In our list
- 10
- Published in the last 12 months
- 10
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-118657Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme HeadersMedium 5.9 28 Oct 2026
- CVE-2026-118654Echo static file middleware route protection bypass via encoded dot-dot traversalMedium 5.9 28 Oct 2026
- CVE-2026-118656Echo has Open Redirect via Control-Character Prefix Defeating sanitizeURIMedium 6.1 28 Oct 2026
- CVE-2026-118658Echo has Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-ProtoMedium 4.7 28 Oct 2026
- CVE-2026-118650Echo's middleware.Static: `%2F`-encoded path bypasses route/group middleware guarding a statically-served pathHigh 7.5 28 Oct 2026
- CVE-2026-118652Echo vulnerable to Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlobMedium 6.1 28 Oct 2026
About github.com/labstack/echo/v5
Vulnerabilities in github.com/labstack/echo/v5
- In our list
- 10
- Published in the last 12 months
- 10
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- CVE-2026-118657Echo: HTTPS Redirect and HSTS Bypass via Unconditional Trust of Forwarded Scheme HeadersMedium 5.9 28 Oct 2026
- CVE-2026-118654Echo static file middleware route protection bypass via encoded dot-dot traversalMedium 5.9 28 Oct 2026
- CVE-2026-118656Echo has Open Redirect via Control-Character Prefix Defeating sanitizeURIMedium 6.1 28 Oct 2026
- CVE-2026-118658Echo has Arbitrary Scheme Injection in WWWRedirect/NonWWWRedirect Middlewares via X-Forwarded-ProtoMedium 4.7 28 Oct 2026
- CVE-2026-118650Echo's middleware.Static: `%2F`-encoded path bypasses route/group middleware guarding a statically-served pathHigh 7.5 28 Oct 2026
- CVE-2026-118652Echo vulnerable to Reflected Cross-Site Scripting (XSS) via unsanitized JSONP callback in Context.JSONP / Context.JSONPBlobMedium 6.1 28 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-118655
- GitHub Advisory Database https://github.com/advisories/GHSA-xwq5-6cqp-vx96