CVE-2026-118262
JSON

8.2high

Echo: WebSocket proxy can retain connections and handlers after client disconnect

Severity
8.2high CVSS:4.0 by GitHub_M
Exploit likelihood
0.38% (higher than 33% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9969-6676-49h5GO-2026-6838

Description

Echo is a Go web framework. From 4.15.0 until 4.16.1 and 5.4.1, Echo's Proxy middleware can retain a handler, copy goroutines, and network connections after a WebSocket client disconnects when the upstream keeps its connection open. The raw proxy waits for both copy directions without reliably closing the peer connection when one direction ends, including when a rejected upgrade response uses HTTP keep-alive. Repeated connections can accumulate resources and cause denial of service, depending on proxy-route accessibility, upstream behavior, and connection deadlines. This issue is fixed in 4.16.1 and 5.4.1.

Affected

Product or packageVersionsReported by
labstack echo>= 4.15.0, < 4.16.1, >= 5.0.0, < 5.4.1CVE List
github.com/labstack/echo/v4 (Go)from 4.15.0 before 4.16.1GitHub Advisory Database, Go Vulnerability Database
github.com/labstack/echo/v5 (Go)from 5.0.0 before 5.4.1GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M8.2high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Classification

CWE-772

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Echo is a Go web framework. From 4.15.0 until 4.16.1 and 5.4.1, Echo's Proxy middleware can retain a handler, copy goroutines, and network connections after a WebSocket client disconnects when the upstream keeps its connection open. The raw proxy waits for both copy directions without reliably closing the peer connection when one direction ends, including when a rejected upgrade response uses HTTP keep-alive. Repeated connections can accumulate resources and cause denial of service, depending on proxy-route accessibility, upstream behavior, and connection deadlines. This issue is fixed in 4.16.1 and 5.4.1.

GitHub Advisory Database

Impact

Echo's Proxy middleware could retain a handler, copy goroutines and network connections after a WebSocket client disconnected if the upstream kept its connection open. The raw proxy waited for both copy directions to finish without reliably closing the other connection when one direction ended. Rejected upgrade responses with HTTP keep-alive were one way to trigger this behavior.

Repeated connections can accumulate resources and cause denial of service. The impact depends on the proxy route's accessibility, upstream behavior and configured connection deadlines. This is a medium-severity resource-retention issue; no confidentiality or integrity impact is claimed.

Affected versions and patch

Affected versions are v4.15.0 through v4.16.0 and v5.0.0 through v5.4.0. The regression was introduced by commit e2133320c7, merged in #2852.

Upgrade to v4.16.1 or v5.4.1. The patch uses Go's HTTP reverse proxy, preserves ordinary HTTP handling for rejected upgrades, and closes both sides of a WebSocket tunnel when either direction ends. It also covers an upstream that receives client EOF but deliberately keeps its side open.

Fix commits: v4, v5.

Workarounds

Disable WebSocket proxy routes until upgrading, or apply bounded connection lifetimes and resource limits at the frontend and upstream. Server idle timeouts alone may not cover hijacked WebSocket connections.

Credits

Reported by @irisitymichaelgrundberg.

Go Vulnerability Database

Echo: WebSocket proxy can retain connections and handlers after client disconnect in github.com/labstack/echo

NVD (es)

Echo es un framework web de Go. Desde la versión 4.15.0 hasta las versiones anteriores a la 4.16.1 y a la 5.4.1, el middleware Proxy de Echo puede retener un manejador, copiar goroutines y conexiones de red después de que un cliente WebSocket se desconecte cuando el origen (upstream) mantiene su conexión abierta. El proxy sin procesar espera en ambas direcciones de copia sin cerrar de forma fiable la conexión del par cuando una dirección finaliza, incluso cuando una respuesta de actualización rechazada utiliza el keep-alive de HTTP. Las conexiones repetidas pueden acumular recursos y causar una denegación de servicio, dependiendo de la accesibilidad de la ruta del proxy, el comportamiento del origen (upstream) y los plazos de conexión. Este problema se ha corregido en las versiones 4.16.1 y 5.4.1.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-118262 changed 2026-11-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-9969-6676-49h5 changed 2026-11-05CC-BY-4.0
Go Vulnerability DatabaseGO-2026-6838 changed 2026-11-05CC-BY-4.0
NVDCVE-2026-118262 changed 2026-11-04Public domain