Path traversal in Echo Go framework static middleware
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
Echo, a Go web framework, is affected before 4.15.3 and from 5.0.0 before 5.2.0. The middleware.Static function decodes an already decoded request path a second time (CWE-174), so double-encoded path separators are rebuilt before filesystem resolution. A remote, unauthenticated attacker can reach a file under a guarded route when the static middleware is registered globally.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
Echo is a Go web framework. Prior to 4.15.3 and 5.2.0, middleware.Static can decode an already decoded Request.URL.Path a second time. Double-encoded separators can consequently be reconstructed before filesystem resolution. This can reach a file under a guarded route when the static middleware is registered globally. This issue is fixed in 4.15.3 and 5.2.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| labstack | echo | 5.0.0 to before 5.2.0; before 4.15.3 | 5.2.0, 4.15.3 | Patch available | CNA |
| — | github.com/labstack/echo/v5 (Go) | before 5.2.0 | 5.2.0 | Patch available | GHSA-xwq5-6cqp-vx96 |
| — | github.com/labstack/echo/v4 (Go) | before 4.15.3 | 4.15.3 | Patch available | GHSA-xwq5-6cqp-vx96 |
- echo Vendorlabstack Affected 5.0.0 to before 5.2.0; before 4.15.3 Fixed in 5.2.0, 4.15.3 Patch available CNA
- github.com/labstack/echo/v5 (Go) Vendor— Affected before 5.2.0 Fixed in 5.2.0 Patch available GHSA-xwq5-6cqp-vx96
- github.com/labstack/echo/v4 (Go) Vendor— Affected before 4.15.3 Fixed in 4.15.3 Patch available GHSA-xwq5-6cqp-vx96
Remediation
Update labstack/echo to 4.15.3 for the v4 module (github.com/labstack/echo/v4) or to 5.2.0 for the v5 module (github.com/labstack/echo/v5).
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA echo (labstack) Fixed in 5.2.0, 4.15.3
- Fix · GHSA-xwq5-6cqp-vx96 github.com/labstack/echo/v5 (Go) Fixed in 5.2.0 Advisory →
- Fix · GHSA-xwq5-6cqp-vx96 github.com/labstack/echo/v4 (Go) Fixed in 4.15.3 Advisory →
Vendor assessments
Timeline
- 2026-10-28 Threatist record created from CVE-2026-118655
- 2026-10-28 Alias added: GHSA-xwq5-6cqp-vx96
- 2026-10-28 Fix available: Go/github.com/labstack/echo/[email protected], Go/github.com/labstack/echo/[email protected] · GHSA-xwq5-6cqp-vx96
- 2026-10-28 CVSS score added · GHSA-xwq5-6cqp-vx96
- 2026-10-28 Weakness changed · GHSA-xwq5-6cqp-vx96
- 2026-10-28 8 new references · GHSA-xwq5-6cqp-vx96
- 2026-10-29 CISA SSVC decision points changed
- 2026-10-29 Priority changed: MEDIUM → LOW
- 2026-11-06 Affected versions changed · Red Hat
- 2026-11-06 CVSS score added · Red Hat
References
Other 8
- https://github.com/labstack/echo/security/advisories/GHSA-xwq5-6cqp-vx96
- https://github.com/labstack/echo/issues/2599
- https://github.com/labstack/echo/pull/3006
- https://github.com/labstack/echo/commit/a9ede66a5a7196411131beb1ee801e75bbaf7ac6
- https://github.com/labstack/echo/commit/c3fa2a27ff92b2b8db360de614f999ef1da24725
- https://github.com/labstack/echo/releases/tag/v4.15.3
- https://github.com/labstack/echo/releases/tag/v5.2.0
- https://github.com/labstack/echo
More labstack vulnerabilities
- TI-2022-18981 Labstack Echo v4.8.0 was discovered to contain an open redirect vulnerability via the… CVSS 3.1CRITICAL 9.6
- TI-2026-82185 Path decoding mismatch in Echo middleware.Static exposes static files CVSS 3.1HIGH 7.5
- TI-2026-40198 Echo: Encoded slash (%2F) bypasses route-level protection and exposes static files CVSS 3.1HIGH 7.5
- TI-2026-82194 Rate limiter bypass in Echo via spoofed X-Forwarded-For header CVSS 3.1MEDIUM 5.3
- TI-2026-20833 Echo has a Windows path traversal via backslash in middleware.Static default filesystem CVSS 3.1MEDIUM 5.3
- TI-2020-18793 Directory traversal on Windows in github.com/labstack/echo/v4 CVSS 3.1MEDIUM 5.3
Sources
- CVE-2026-118655 · CVE Program
- CVE-2026-118655 · NVD
- FIRST EPSS
- GHSA-xwq5-6cqp-vx96 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-118655 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences