9.1critical
Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls
- Severity
- 9.1critical CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.52% (higher than 45% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-cxf3-9h37-7rr8GO-2026-6839
Description
Echo is a Go web framework. From 4.0.0 until 4.16.1 and 5.4.1, Echo's Proxy middleware selects a raw tunnel from a client WebSocket upgrade request before verifying that the configured upstream accepted the upgrade. If the upstream rejects the upgrade with an ordinary keep-alive response, later HTTP requests on the connection are sent directly to that upstream without passing through Echo's router or route-specific middleware. This can bypass authentication or authorization enforced only by Echo routes, but requires an accessible proxy route, a cooperating rejected-upgrade response, and a target without independent upstream authorization. This issue is fixed in 4.16.1 and 5.4.1.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| labstack echo | >= 4.0.0, < 4.16.1, >= 5.0.0, < 5.4.1 | CVE List |
| github.com/labstack/echo/v4 (Go) | from 4.0.0 before 4.16.1 | GitHub Advisory Database, Go Vulnerability Database |
| github.com/labstack/echo/v5 (Go) | from 5.0.0 before 5.4.1 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 9.1critical CVSS:4.0 | 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 |
| GitHub | critical CVSS:4.0 | 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 |
Classification
What each source says
CVE List
Echo is a Go web framework. From 4.0.0 until 4.16.1 and 5.4.1, Echo's Proxy middleware selects a raw tunnel from a client WebSocket upgrade request before verifying that the configured upstream accepted the upgrade. If the upstream rejects the upgrade with an ordinary keep-alive response, later HTTP requests on the connection are sent directly to that upstream without passing through Echo's router or route-specific middleware. This can bypass authentication or authorization enforced only by Echo routes, but requires an accessible proxy route, a cooperating rejected-upgrade response, and a target without independent upstream authorization. This issue is fixed in 4.16.1 and 5.4.1.
GitHub Advisory Database
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.
Go Vulnerability Database
Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls in github.com/labstack/echo
NVD (es)
Echo es un framework web de Go. Desde la versión 4.0.0 hasta la 4.16.1 y la 5.4.1, el middleware Proxy de Echo selecciona un túnel sin procesar de una solicitud de actualización de WebSocket del cliente antes de verificar que el upstream configurado aceptó la actualización. Si el upstream rechaza la actualización con una respuesta keep-alive ordinaria, las solicitudes HTTP posteriores en la conexión se envían directamente a ese upstream sin pasar por el router de Echo o el middleware específico de la ruta. Esto puede eludir la autenticación o autorización impuestas únicamente por las rutas de Echo, pero requiere una ruta de proxy accesible, una respuesta de actualización rechazada cooperativa y un objetivo sin autorización upstream independiente. Este problema se corrige en las versiones 4.16.1 y 5.4.1.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-118264 changed 2026-10-30 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-cxf3-9h37-7rr8 changed 2026-11-05 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-6839 changed 2026-11-05 | CC-BY-4.0 |
| NVD | CVE-2026-118264 changed 2026-11-04 | Public domain |