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.
What it allows
For another WebSocket authentication boundary, review Marimo terminal WebSocket flaw (CVE-2026-39987) in notebook deployments.
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
-
22 Oct 2026
LabStack publishes GHSA-cxf3-9h37-7rr8 and fixed Echo releases 4.16.1 and 5.4.1.
-
28 Oct 2026
The GitHub CNA publishes CVE-2026-118264 with a 9.1 Critical CVSS 4.0 score.
What to do
-
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.
-
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.
-
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.
-
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.
What Brandefense can do
- Watch your stack for exploited flaws
Name the vendors and products you run, and Brandefense alerts you when a CVE in them is exploited.
- See CVE-2026-118264 in Brandefense Atlas
The Atlas record of CVE-2026-118264: severity, exploitation status and the sources behind it.
- Vulnerability intelligence platform
Brandefense Vulnerability Intelligence follows which vulnerabilities attackers are using, so your team can patch what is under attack first.
Frequently Asked 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
- Echo Rejected WebSocket Upgrade AdvisoryLabStack
- CVE-2026-118264 RecordCVE Program / GitHub CNA
- Echo v4.16.1 Release NotesLabStack
- Echo v5.4.1 Release NotesLabStack