# CVE-2026-118655: Echo path traversal via double URL encoding in Static middleware

Source: https://junglewise.ai/threats/cve-2026-118655-echo-is-a-go-web-framework-prior-to-4-15-3-and-5-2-0-middleware  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-28. Updated: 2026-10-28  
License: CC BY 4.0 with a link back

CVE-2026-118655 · Severity: medium · CVSS 5.9 · Published 2026-10-28

Echo is a Go web framework used to build HTTP services. The Static middleware component can be bypassed by attackers using double-encoded path separators, allowing them to access files outside their intended directory and potentially reach protected resources. This affects Echo versions before 4.15.3 and 5.2.0.

Technologies: [github.com/labstack/echo/v4 (Go)](https://junglewise.ai/threats/technologies/github-com-labstack-echo-v4), [github.com/labstack/echo/v5 (Go)](https://junglewise.ai/threats/technologies/github-com-labstack-echo-v5), [Labstack Echo](https://junglewise.ai/threats/technologies/labstack-echo). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Labstack](https://junglewise.ai/threats/vendors/labstack).

## Quick answers

**Is CVE-2026-118655 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-118655 being exploited in the wild.

**How severe is CVE-2026-118655?** Medium severity, with a CVSS score of 5.9, published 28 October 2026.

**Which products and versions are affected?** github.com/labstack/echo/v4 (Go) < 4.15.3, SEMVER:introduced=0,fixed=4.15.3; github.com/labstack/echo/v5 (Go) < 5.2.0, SEMVER:introduced=0,fixed=5.2.0; Labstack Echo before 4.15.3 and 5.2.0.

**Is there a fix for CVE-2026-118655?** Yes. github.com/labstack/echo/v4 (Go): upgrade to 4.15.3 or later; github.com/labstack/echo/v5 (Go): upgrade to 5.2.0 or later. Until then: Upgrade to Echo 4.15.3, 5.2.0, or later. Alternatively, disable the Static middleware globally or restrict it to specific paths that do not expose sensitive files. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-118655 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-118655?** Check whether you run github.com/labstack/echo/v4 (Go), github.com/labstack/echo/v5 (Go) or Labstack Echo at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/labstack/echo/v4 (Go): upgrade to 4.15.3 or later

  ```sh
  go get github.com/labstack/echo/v4@v4.15.3
  ```

- github.com/labstack/echo/v5 (Go): upgrade to 5.2.0 or later

  ```sh
  go get github.com/labstack/echo/v5@v5.2.0
  ```


Upgrade to Echo 4.15.3, 5.2.0, or later. Alternatively, disable the Static middleware globally or restrict it to specific paths that do not expose sensitive files.

## Technical details

The vulnerability exists in middleware.Static, which performs a second URL decode on Request.URL.Path that is already decoded by net/http. An attacker can send double-encoded separators (e.g., "%252F" for "/") that survive the initial decode and are reconstructed before filesystem resolution, enabling path traversal. The attack succeeds when the static middleware is registered globally and can bypass route-level access controls.

## Affected products

- LabStack Echo before 4.15.3 and 5.2.0

## Identifiers

- CVE-2026-118655
- GHSA-xwq5-6cqp-vx96
- GO-2026-6885

## Timeline

- 2026-10-28: disclosed
- 2026-06-14: patched

## References

- [https://github.com/labstack/echo/commit/a9ede66a5a7196411131beb1ee801e75bbaf7ac6](https://github.com/labstack/echo/commit/a9ede66a5a7196411131beb1ee801e75bbaf7ac6)
- [https://github.com/labstack/echo/commit/c3fa2a27ff92b2b8db360de614f999ef1da24725](https://github.com/labstack/echo/commit/c3fa2a27ff92b2b8db360de614f999ef1da24725)

## Related threats

- [Echo web framework arbitrary URI scheme redirect](https://junglewise.ai/threats/cve-2026-118658-echo-is-a-go-web-framework-prior-to-4-15-2-and-5-1-1-context)
- [Echo Go web framework scheme header spoofing and HSTS bypass](https://junglewise.ai/threats/cve-2026-118657-echo-is-a-go-web-framework-prior-to-4-16-0-and-5-4-0-context)
- [Echo open redirect in sanitizeURI with trailing slash redirect](https://junglewise.ai/threats/cve-2026-118656-echo-is-a-go-web-framework-prior-to-4-16-0-and-5-4-0-sanitizeuri)
- [Echo path traversal in static file handlers via dot segment normalization](https://junglewise.ai/threats/cve-2026-118654-echo-is-a-go-web-framework-prior-to-4-16-0-and-5-4-0-echo-s)
- [Echo Go web framework rate-limit bypass via spoofed IP headers](https://junglewise.ai/threats/cve-2026-118653-echo-is-a-go-web-framework-from-4-0-0-until-5-1-0-context-realip)
