Skip to main content

CVE-2026-118264 — Vulnerability in github.com/labstack/echo/v4

CRITICAL

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

Published October 23, 2026Updated November 5, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.70%). Schedule for your next planned update.

Does your project use an affected github.com/labstack/echo/v4 version?

Paste your go.sum to check it for CVE-2026-118264 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

Summary

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.

Advisory Timeline

  • First published October 23, 2026 (34 days ago).
  • Last revised November 5, 2026 — 13 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/labstack/echo/v4 to 4.16.1 or later
go get github.com/labstack/echo/v4@v4.16.1
Go
Update github.com/labstack/echo/v5 to 5.4.1 or later
go get github.com/labstack/echo/v5@v5.4.1

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Go (2).

PackageFixed In
github.com/labstack/echo/v4 Go · Affected: All versions4.16.1
github.com/labstack/echo/v5 Go · Affected: All versions5.4.1

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.6 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-118264?
Echo: Rejected WebSocket upgrades can bypass Echo route-level access controls. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 8.6/10).
How do I check if my project is affected by CVE-2026-118264?
CVE-2026-118264 affects github.com/labstack/echo/v4 and github.com/labstack/echo/v5. It has a 0.7% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-118264 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.6

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
0.70%
EPSS percentile: 48.8

This is a below-median EPSS score — only 48.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-cxf3-9h37-7rr8
GO-2026-6839

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum