CVE-2026-118650

Echo: middleware.Static: `%2F`-encoded path bypasses route/group middleware guarding a statically-served path

Published Oct 28, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, a globally mounted middleware.Static instance can interpret an encoded request path differently from Echo's router because the router matches the still-encoded path while the static handler uses the decoded URL.Path. The advisory demonstrates an encoded slash resolving to a file under the static root through the global static middleware, but the source is internally inconsistent about whether a route or group guard protects the corresponding literal path in that global-mount configuration. This issue is fixed in 4.16.0 and 5.4.0.

Analysis

AI-generated

Technical impact

A globally mounted Echo middleware.Static instance interprets encoded URL paths differently from the framework’s router. While the router continues to match the still‑encoded path, the static handler decodes URL.Path, allowing an encoded slash (%2F) to resolve to a file path under the static root that would otherwise be protected by route or group middleware. The effect is a privilege escalation or data disclosure because an attacker can craft a request that bypasses middleware guards and serves static content from directories that should be inaccessible.

Affected Systems

The affected product is Echo, the Go web framework maintained by Labstack. Any installation using a global static middleware in versions earlier than 4.16.0 or 5.4.0 is vulnerable. These versions lack the path‑decoding guard that aligns the router and static handler.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity vulnerability. The attack can be performed remotely by sending an HTTP request containing an encoded slash to a host running Echo. An attacker does not need advanced privileges, only the ability to request the vulnerable static resource. The vulnerability is not listed in the CISA KEV catalog, and the EPSS score is 0.00396 (below 1%), but the potential impact of unauthorized file exposure makes it a priority. Because the path mismatch is a direct result of how Echo handles URL decoding, the flaw is readily exploitable if the attacker can target a vulnerable deployment.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Echo to version 4.16.0 or later, or 5.4.0 or later, to fix the path decoding inconsistency.
  • If an upgrade is not possible, remove or limit the global static middleware so that protected paths are not under its scope, or mount static middleware only on routes that are explicitly intended to be public.
  • Implement input validation to reject or normalize percent‑encoded slashes before they reach the static handler, mitigating the CWE‑177 path traversal weakness.

Generated by OpenCVE AI on November 6, 2026 at 02:11 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-375p-5qhx-8wq4 Echo's middleware.Static: `%2F`-encoded path bypasses route/group middleware guarding a statically-served path
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Labstack
Labstack echo
Vendors & Products Labstack
Labstack echo
Type Values Removed Values Added
Description Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, a globally mounted middleware.Static instance can interpret an encoded request path differently from Echo's router because the router matches the still-encoded path while the static handler uses the decoded URL.Path. The advisory demonstrates an encoded slash resolving to a file under the static root through the global static middleware, but the source is internally inconsistent about whether a route or group guard protects the corresponding literal path in that global-mount configuration. This issue is fixed in 4.16.0 and 5.4.0.
Title Echo: middleware.Static: `%2F`-encoded path bypasses route/group middleware guarding a statically-served path
Weaknesses CWE-177
CWE-863
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

Weaknesses
  • CWE-177

    Improper Handling of URL Encoding (Hex Encoding)

  • CWE-551

    Incorrect Behavior Order: Authorization Before Parsing and Canonicalization

  • CWE-863

    Incorrect Authorization

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 2, 2026, 8:40 PM
Reserved
Oct 28, 2026, 5:25 PM
Status
Undergoing Analysis
Published
Oct 28, 2026, 8:17 PM
Modified
Nov 2, 2026, 9:17 PM
Severity
Important
Public date
Oct 28, 2026, 7:25 PM