CVE-2026-118264

CVE-2026-118264 is a critical-severity incorrect authorization vulnerability in github.com/labstack/echo/v4 (go), affecting versions >= 4.0.0, < 4.16.1. It is fixed in 4.16.1, 5.4.1.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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.

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.

The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions. Typical impact: unauthorized data access or execution of privileged operations.

Affected versions

github.com/labstack/echo/v4 (>= 4.0.0, < 4.16.1) github.com/labstack/echo/v5 (>= 5.0.0, < 5.4.1)

Security releases

github.com/labstack/echo/v4 → 4.16.1 (go) github.com/labstack/echo/v5 → 5.4.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

github.com/labstack/echo/v4 to 4.16.1 or later; github.com/labstack/echo/v5 to 5.4.1 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-118264? CVE-2026-118264 is a critical-severity incorrect authorization vulnerability in github.com/labstack/echo/v4 (go), affecting versions >= 4.0.0, < 4.16.1. It is fixed in 4.16.1, 5.4.1. The application does not correctly enforce access controls, allowing a principal to access resources or operations beyond their granted permissions.
  2. Which packages are affected by CVE-2026-118264?
    • github.com/labstack/echo/v4 (go) (versions >= 4.0.0, < 4.16.1)
    • github.com/labstack/echo/v5 (go) (versions >= 5.0.0, < 5.4.1)
  3. Is there a fix for CVE-2026-118264? Yes. CVE-2026-118264 is fixed in 4.16.1, 5.4.1. Upgrade to this version or later.
  4. Is CVE-2026-118264 exploitable, and should I be worried? Whether CVE-2026-118264 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-118264 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-118264?
    • Upgrade github.com/labstack/echo/v4 to 4.16.1 or later
    • Upgrade github.com/labstack/echo/v5 to 5.4.1 or later

Other vulnerabilities in github.com/labstack/echo/v4

Stop the waste.
Protect your environment with Kodem.