CVE-2026-118264: Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls

Published Oct 23, 2026
·
Updated

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.

Fix commits: v4, v5.

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.

Other sources

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.

— Debian

Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls in github.com/labstack/echo

— OSV

Affected Software

14 affected componentsFixes available
Labstack Echo>=4.0.0<4.16.1, >=5.0.0<5.4.1
debian/golang-github-labstack-echo<=4.2.1-3, <=4.12.0-1
debian/golang-github-labstack-echo*
debian/golang-github-labstack-echo*
debian/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo.v2*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*
ubuntu/golang-github-labstack-echo*
go/github.com/labstack/echo/v4>=4.0.0<4.16.1
4.16.1
go/github.com/labstack/echo/v5>=5.0.0<5.4.1
5.4.1
IBM API Connect<=V10.0.8.0 - V10.0.8.13

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/labstack/echo/v4 to a version that resolves this vulnerability.

    Fixed in 4.16.1
  2. Upgrade

    Upgrade go/github.com/labstack/echo/v5 to a version that resolves this vulnerability.

    Fixed in 5.4.1
  3. Upgrade

    Upgrade github.com/labstack/echo to a version that resolves this vulnerability.

    Fixed in 4.16.1
  4. Upgrade

    Upgrade github.com/labstack/echo to a version that resolves this vulnerability.

    Fixed in 5.4.1
  5. Compensating control

    Reject WebSocket upgrade requests before they reach affected Echo proxy routes.

  6. Compensating control

    Enforce authorization independently at every upstream resource.

Event History

Oct 23, 2026
Advisory Published
via OSV·08:49 PM
Data Sourced
via OSV·08:49 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via GitHub·08:49 PM
DescriptionWeaknessAffected Software
Oct 28, 2026
CVE Published
via MITRE·07:03 PM
Data Sourced
via MITRE·07:03 PM
DescriptionWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Nov 18, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

Which deployments are exposed to this bypass?

Deployments using Echo versions from 4.0.0 through 4.16.1, or version 5.4.1, are affected when they expose a proxy route and rely solely on Echo route-level middleware for authentication or authorization. The upstream target must not enforce independent authorization.

2

What must an attacker be able to do to exploit the issue?

An attacker needs access to a proxy route and must initiate a WebSocket upgrade request. Exploitation also requires the configured upstream to reject that upgrade with an ordinary keep-alive response, after which subsequent HTTP requests on that connection can reach the upstream directly.

3

Does upstream authentication prevent the bypass?

Yes. The bypass is relevant only where authentication or authorization is enforced exclusively by Echo routes or route-specific middleware. An upstream that independently authorizes requests is not described as vulnerable to this access-control bypass.

4

What is the remediation?

Upgrade Echo to a fixed release: 4.16.1 or 5.4.1. If an immediate upgrade is not possible, ensure upstream services enforce their own authentication and authorization rather than relying only on Echo route-level controls.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203