Vulnerability

Echo WebSocket Route Access Bypass (CVE-2026-118264)

A Critical access control bypass in the Echo Go web framework.

CVE ID
CVE-2026-118264
CVSS
9.1 Critical (CVSS v4.0, GitHub CNA)
Affected product
Echo Go web framework
Exploited
Unknown
Published
28 October 2026

In short

CVE-2026-118264 is a Critical access control bypass in the Echo Go web framework. A rejected WebSocket upgrade can leave a raw tunnel that skips Echo route checks. Exposure depends on the proxy route and upstream behavior. Echo 4.16.1 and 5.4.1 fix the issue, rated 9.1 under CVSS 4.0.

Profile MapVulnerability
  1. CVECVE-2026-118264
  2. ProductLabStack Echo Go web framework
  3. Fix Steps4actions listed

What it allows

Echo's Proxy middleware forwards requests to a configured upstream server. The flaw concerns how it handles a client's request to switch from HTTP to WebSocket. The old code chose a raw tunnel before checking whether the upstream had accepted that switch.

An upstream could reject the upgrade with an ordinary HTTP response yet keep the connection open. Later HTTP requests on that connection then went straight to the same upstream. They skipped Echo's router and the checks tied to individual routes.

Authentication or authorization enforced only at those Echo routes could be bypassed. The upstream's own access checks still apply. The advisory does not describe a way to choose arbitrary hosts. It also does not establish remote code execution or attacks in the wild.

Three conditions matter together: the proxy route is reachable, the upstream rejects the upgrade without closing the connection, and the target resource lacks its own authorization. A vulnerable version alone does not show that all three conditions hold.

For related application risks, see our Fastify Express middleware bypass and Jackson polymorphic type bypass. Our developer security guide covers secure coding practice.

Who is affected

The v4 module, github.com/labstack/echo/v4, is affected from 4.0.0 up to, but excluding, 4.16.1. The v5 module, github.com/labstack/echo/v5, is affected from 5.0.0 up to, but excluding, 5.4.1. The maintainer confirmed the behavior at runtime in 4.15.0, 4.16.0, 5.0.0, and 5.4.0.

Source history also shows the missing upgrade-response check in 4.0.0. The patched releases are 4.16.1 for the v4 line and 5.4.1 for v5. The fix uses Go's HTTP reverse proxy and opens a tunnel only after a valid upstream upgrade response. Rejected upgrades stay ordinary HTTP requests.

The v4.16.1 release requires Go 1.26 or later. The v5.4.1 release keeps Go 1.25 as its module minimum. Use a supported, patched Go toolchain and test the chosen release with the application. These toolchain requirements differ between the two major lines.

The maintainer published the advisory and fixed releases on 22 October 2026. The CVE Program record was published on 28 October. Those are separate events; the later CVE record does not mean the patches first became available that day.

Timeline

  1. 22 Oct 2026

    LabStack publishes GHSA-cxf3-9h37-7rr8 and fixed Echo releases 4.16.1 and 5.4.1.

  2. 28 Oct 2026

    The GitHub CNA publishes CVE-2026-118264 with a 9.1 Critical CVSS 4.0 score.

What to do

  1. Map Proxy Routes and Upstream Checks

    Find Echo Proxy middleware in the deployed app. Record the module version and each upstream target. Check whether access control exists only in Echo route middleware or also at the upstream resource.

  2. Upgrade Within the Correct Major Line

    Move v4 deployments to the 4.16.1 fix or v5 deployments to 5.4.1. Confirm the deployed binary includes that version. Check the different Go minimums before building the replacement.

  3. Block Upgrades When Patching Must Wait

    The maintainer permits rejecting WebSocket upgrade requests before they reach affected proxy routes. Another workaround is independent authorization at every upstream resource. A non-101 response alone does not stop the vulnerable raw tunnel.

  4. Validate Access Control After Rollout

    As a defensive check, test that protected resources still enforce authorization through the proxy and at the upstream. Include the rejected-upgrade case in an authorized test environment. Keep the test results with the patch record.

Questions

Which Echo Versions Fix CVE-2026-118264?

Echo 4.16.1 fixes the v4 line and 5.4.1 fixes v5. The affected ranges are v4 from 4.0.0 before 4.16.1 and v5 from 5.0.0 before 5.4.1. Check the deployed module and the release toolchain requirements.

Does Rejecting a WebSocket Upgrade Stop the Bypass?

An ordinary rejection from the upstream is not enough if it leaves the connection open. The maintainer advises rejecting upgrade requests before affected Echo proxy routes, or enforcing authorization independently on every upstream resource.

Sources

  1. Echo Rejected WebSocket Upgrade Advisory LabStack
  2. CVE-2026-118264 Record CVE Program / GitHub CNA
  3. Echo v4.16.1 Release Notes LabStack
  4. Echo v5.4.1 Release Notes LabStack