CVE-2026-118264 — Vulnerability in github.com/labstack/echo/v4
Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.70%). Schedule for your next planned update.
Does your project use an affected github.com/labstack/echo/v4 version?
Paste your go.sum to check it for CVE-2026-118264 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Impact
Echo's Proxy middleware selected a raw tunnel when the client requested a WebSocket upgrade, before validating whether the configured upstream accepted it. If the upstream returned an ordinary HTTP response and kept the connection alive, subsequent HTTP requests on that connection were forwarded directly to the same upstream without passing through Echo's router or route-specific middleware.
This can bypass authentication or authorization enforced only at Echo's routes. Exploitation requires an accessible proxy route, an upstream that rejects the upgrade without closing the connection, and a target resource on that upstream without independent authorization. The issue does not provide arbitrary-host proxying or bypass the upstream's own authentication.
Affected versions and patch
The raw proxy implementation is present throughout the v4 and v5 release lines up to v4.16.0 and v5.4.0. Runtime reproductions confirmed v4.15.0, v4.16.0, v5.0.0 and v5.4.0; source history also shows the missing upgrade-response validation in v4.0.0.
Upgrade to v4.16.1 or v5.4.1. The patch routes WebSocket upgrades through Go's HTTP reverse proxy and enters a tunnel only after a valid upstream upgrade response. Rejected upgrades remain ordinary HTTP requests.
Workarounds
Reject WebSocket upgrade requests before they reach affected Echo proxy routes, or enforce authorization independently at every upstream resource. Merely returning a non-101 response from the upstream does not prevent the vulnerable raw tunnel.
Credits
Reported by @Duodum.
Advisory Timeline
- First published October 23, 2026 (34 days ago).
- Last revised November 5, 2026 — 13 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/labstack/echo/v4@v4.16.1
go get github.com/labstack/echo/v5@v5.4.1
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: Go (2).
| Package | Fixed In |
|---|---|
| github.com/labstack/echo/v4 Go · Affected: All versions | 4.16.1 |
| github.com/labstack/echo/v5 Go · Affected: All versions | 5.4.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-444
- CWE-863Incorrect AuthorizationMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.6 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
References
- https://github.com/labstack/echo/security/advisories/GHSA-cxf3-9h37-7rr8WEB
- https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaecWEB
- https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421fWEB
- https://github.com/labstack/echoPACKAGE
- https://github.com/labstack/echo/releases/tag/v4.16.1WEB
- https://github.com/labstack/echo/releases/tag/v5.4.1WEB
Frequently Asked Questions
- What is CVE-2026-118264?
- Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 8.6/10).
- How do I check if my project is affected by CVE-2026-118264?
- CVE-2026-118264 affects github.com/labstack/echo/v4 and github.com/labstack/echo/v5. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-118264 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 48.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-104099CRITICAL
Fabio: Access-control bypass through unnormalized request paths
- CVE-2026-77369CRITICAL
Daptin: Broken Access Control (IDOR) in the generic YJS collaboration endpoint