Echo Go framework: rejected WebSocket upgrades let requests bypass route-level auth in the Proxy middleware
Echo (github.com/labstack/echo) Proxy middleware
Sponsored
Brought to you byTinkerer Club
The private club for people who own their servers, run their own AI, and pay $0/month for software.
Echo's Proxy middleware opened a raw tunnel as soon as a client asked for a WebSocket upgrade, before checking whether the upstream accepted it. If the upstream answered with an ordinary HTTP response and kept the connection alive, later HTTP requests on that connection went straight to the upstream without passing through Echo's router or route-specific middleware, which can bypass authentication or authorization enforced only at Echo's routes. It needs an accessible proxy route, an upstream that rejects the upgrade without closing the connection, and a target resource on that upstream without its own authorization. It affects the v4 and v5 release lines; upgrade to v4.16.1 or v5.4.1. GitHub rates it critical (CVSS 4.0 9.1), and it is tracked as CVE-2026-118264.
Why this severity: GitHub-rated critical; only affects apps using Echo's Proxy middleware where the upstream relies on Echo for auth
- Started
- Oct 23, 2026
Affected
- github.com/labstack/echo/v4 >= 4.0.0, < 4.16.1
- github.com/labstack/echo/v5 >= 5.0.0, < 5.4.1
Fixed in
- github.com/labstack/echo/v4 4.16.1
- github.com/labstack/echo/v5 5.4.1
Timeline2
Echo publishes GHSA-cxf3-9h37-7rr8 and releases v4.16.1 and v5.4.1 with the fix.
Same v4.16.1 / v5.4.1 security release also publishes sibling advisories: GHSA-f48p-c9v4-h7xv (CVE-2026-118260 BodyDump unbounded body capture), GHSA-h7wr-284f-5qvc (CVE-2026-118261 Decompress unbounded gzip expansion), GHSA-9969-6676-49h5 (CVE-2026-118262 WebSocket proxy connection retention), and GHSA-h53f-rm2w-w7rg (CVE-2026-118265 X-Real-IP extractor trusts header instead of peer, v5 only).
Advisories13
- CVE-2026-118264CVE.org · Oct 28, 2026
- GHSA-cxf3-9h37-7rr8: Rejected WebSocket upgrades can bypass Echo route-level access controlslabstack/echo · Oct 23, 2026
- GHSA-cxf3-9h37-7rr8GitHub Advisory Database · Oct 23, 2026
- Echo v4.16.1 releaselabstack/echo
- Echo v5.4.1 releaselabstack/echo
- GHSA-f48p-c9v4-h7xv / CVE-2026-118260: BodyDump captures request and response bodies without size limits (v4)labstack/echo · Oct 23, 2026
- CVE-2026-118260CVE.org · Oct 23, 2026
- GHSA-h7wr-284f-5qvc / CVE-2026-118261: Decompress permits unbounded gzip expansion (v4)labstack/echo · Oct 23, 2026
- CVE-2026-118261CVE.org · Oct 23, 2026
- GHSA-9969-6676-49h5 / CVE-2026-118262: WebSocket proxy can retain connections after client disconnectlabstack/echo · Oct 23, 2026
- CVE-2026-118262CVE.org · Oct 23, 2026
- GHSA-h53f-rm2w-w7rg / CVE-2026-118265: X-Real-IP extractor trusts header value instead of peer (v5)labstack/echo · Oct 23, 2026
- CVE-2026-118265CVE.org · Oct 23, 2026
Get an email when a new major security incident drops. No spam, unsubscribe any time.