CVE-2026-118654
## Summary Echo v5.2.0 contains a bypass of the fix for GHSA-vfp3-v2gw-7wfq. The fix rejects encoded path separators such as `%2F` and `%5C` before static file path unescaping, but two traversal forms still bypass route-level middleware protections for static files. The primary bypass uses encoded dot-dot segments. A request such as `/public/%2E%2E/admin/secret.txt` passes the encoded-separator guard, is unescaped to `public/../admin/secret.txt`, then `path.Clean` resolves it to `admin/secret.txt`. If `/admin/*` is protected by middleware but the static filesystem is mounted at `/`, the protected file is returned through the public static route. A second bypass exists when `UseEscapedPathForMatching=true`. In that mode, the router normalizes encoded separators before the static handler checks the wildcard. The handler receives a decoded wildcard with no `%` characters, so the encoded-separator guard does not run on the original encoded path. ## Impact 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. The high-severity variant works with the default router configuration and requires only encoded dot-dot path segments. The direct protected route returns 403, while the public static route returns the protected file content. The `UseEscapedPathForMatching=true` variant is lower severity because it requires a non-default router configuration. ## Affected versions Tested vulnerable: - `github.com/labstack/echo/v5` v5.2.0 - Current `master` at `5786024ea4d85c01784796e8aa7aac53e007b39b` No patched version is currently known. ## Policy and version checks GitHub Private Vulnerability Reporting is enabled for `labstack/echo`. The repository has a root `SECURITY.md` and accepts security reports through GitHub Security Advisories. The vulnerable code was revalidated on both current `master` and the latest rel
Properties
- Severity
- medium
- Summary
- Echo static file middleware route protection bypass via encoded dot-dot traversal
- Nvd fetched at
- 2026-10-28T23:43:43.157973+00:00
- Cvss severity
- MEDIUM
- Cvss score
- 5.9
- Retrieved at
- 2026-10-28T23:45:49+00:00
- Ghsa published
- 2026-10-28T21:04:46Z
- Source url
- https://github.com/advisories/GHSA-3pmx-cf9f-34xr
- Ghsa updated
- 2026-10-28T21:04:47Z
- Ghsa id
- GHSA-3pmx-cf9f-34xr
- Last source
- GitHub Advisory Database
- Score
- 5.9
- Cvss version
- 3.1
- Cve id
- CVE-2026-118654
- Cvss vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- First seen by Signal
- 2026-10-28T23:44:40+00:00
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- Published at
- 2026-10-28T20:17:22.550
- Last modified
- 2026-10-28T20:17:22.550
Related Entities (5)
AFFECTS (2)
VULNERABLE_TO (2)
HAS_WEAKNESS (1)
Explore deeper with Ninja Signal's threat intelligence graph