CVE-2026-118654

Echo static file middleware route protection bypass via encoded dot-dot traversal

Published Oct 28, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
Echo is a Go web framework. Prior to 4.16.0 and 5.4.0, Echo's static file handlers can normalize dot segments after route matching and serve a file through a public static route even though the corresponding direct path is protected by route-level middleware. An unauthenticated attacker can read files that an application intended to protect with route-level middleware, when those files are also reachable through a static filesystem mount after path normalization. This vulnerability is the result of an incomplete fix for CVE-2026-55677. This issue is fixed in 4.16.0 and 5.4.0.

Analysis

AI-generated

Technical impact

Echo's static file handlers normalize dot segments after a request has matched a route. Prior to versions 4.16.0 and 5.4.0, this normalization could transform a URI that points to a protected resource into a path that resolves to a file located under a public static directory. The attacker can then read any file that the application had intended to protect with route‑level middleware. The vulnerability is a path‑traversal flaw, CWE‑22, that results in confidential data disclosure but does not give the attacker code execution or privilege escalation.

Affected Systems

The bug affects the Go web framework Echo from the labstack vendor. Any installation of Echo version 4.15.x or earlier, and 5.3.x or earlier, is vulnerable. The issue was fixed in Echo release 4.16.0 and 5.4.0. Systems running earlier releases without applying the patch are at risk.

Risk and Exploitability

The CVSS score of 5.9 indicates a moderate risk. Because the EPSS score is less than 1%, the likelihood of exploitation is relatively low, though it is still possible. The vulnerability is not listed in the CISA KEV catalog, but the flaw can be triggered with a simple HTTP GET request that contains encoded dot‑dot segments. Authentication is not required and the attacker only needs to know a protected file name and that a public static mount exists. The impact is limited to unauthorized file disclosure and is mitigated by the vendor’s patches.

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
  • If an upgrade cannot be performed immediately, remove or disable static file middleware for routes that require authentication, or relocate static mounts so they do not overlap protected directories
  • Configure static handlers to reject dot‑segment paths or use a secure file serving library that normalizes paths prior to authorization checks

Generated by OpenCVE AI on November 6, 2026 at 01:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-3pmx-cf9f-34xr Echo static file middleware route protection bypass via encoded dot-dot traversal
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', '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, Echo's static file handlers can normalize dot segments after route matching and serve a file through a public static route even though the corresponding direct path is protected by route-level middleware. An unauthenticated attacker can read files that an application intended to protect with route-level middleware, when those files are also reachable through a static filesystem mount after path normalization. This vulnerability is the result of an incomplete fix for CVE-2026-55677. This issue is fixed in 4.16.0 and 5.4.0.
Title Echo static file middleware route protection bypass via encoded dot-dot traversal
Weaknesses CWE-22
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-41

    Improper Resolution of Path Equivalence

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 2, 2026, 8:43 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
Moderate
Public date
Oct 28, 2026, 7:59 PM