All vulnerabilities

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.

From the GitHub Advisory Database, CC BY 4.0.

Workarounds

Keep files that need protection outside the Static middleware's root directory.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
github.com/labstack/echo/v4Go · osv:Go:github.com/labstack/echo/v4
  • Every version before 4.15.3
github.com/labstack/echo/v5Go · osv:Go:github.com/labstack/echo/v5
  • Every version before 5.2.0

About github.com/labstack/echo/v4

About github.com/labstack/echo/v5

References