Echo auth bypass in Proxy WebSocket tunneling
labstack echo
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/labstack/echo/v4 Go |
|
|
| github.com/labstack/echo/v5 Go |
|
|
labstack echo
| Product | Affected | Fixed in |
|---|---|---|
| github.com/labstack/echo/v4 Go |
|
|
| github.com/labstack/echo/v5 Go |
|
|
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.
From the CVE record · GitHub_M
Echo's Proxy middleware can select a raw tunnel for a client WebSocket upgrade before confirming the upstream accepted it. If an accessible proxy route receives a rejected upgrade with a keep-alive response, later requests can bypass Echo's router and route-specific authentication or authorization; the target must also lack independent upstream authorization.
Check Go applications using github.com/labstack/echo/v4 versions >=4.0.0 and <4.16.1 or github.com/labstack/echo/v5 versions >=5.0.0 and <5.4.1.