Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-118264

Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls
Back to all
CVE

CVE-2026-118264

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

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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
9.1
-
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
6.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Related Resources

No items found.

References

https://github.com/labstack/echo/security/advisories/GHSA-cxf3-9h37-7rr8, https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec, https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f, https://github.com/labstack/echo, https://github.com/labstack/echo/releases/tag/v4.16.1, https://github.com/labstack/echo/releases/tag/v5.4.1

Severity

6.5

CVSS Score
0
10

Basic Information

Base CVSS
6.5
EPSS Probability
0.00701%
EPSS Percentile
0.4884%
Introduced Version
5.0.0,4.0.0,v4.0.0,v5.0.0,0
Fix Available
5.4.1,4.16.1,v4.16.1,v5.4.1,2.3.1-r11,2.3.1-r10,8.38.1-r2,0.2.9-r28,0.2.9-r26,6.2.0-r16,0.55.0-r1,1.9.1-r6,1.9.1-r8,2.57.0-r1

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading