{"id":"CVE-2026-118262","aliases":["CVE-2026-118262","GHSA-9969-6676-49h5","GO-2026-6838"],"related":[],"kind":"vulnerability","state":"published","title":"Echo: WebSocket proxy can retain connections and handlers after client disconnect","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Impact\n\nEcho'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.\n\nRepeated 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.\n\n## Affected versions and patch\n\nAffected 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.\n\nUpgrade to [v4.16.1](https://github.com/labstack/echo/releases/tag/v4.16.1) or [v5.4.1](https://github.com/labstack/echo/releases/tag/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.\n\nFix commits: [v4](https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f), [v5](https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec).\n\n## Workarounds\n\nDisable 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.\n\n## Credits\n\nReported by @irisitymichaelgrundberg.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Echo: WebSocket proxy can retain connections and handlers after client disconnect in github.com/labstack/echo","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-10-23T20:50:17.000Z","modified":"2026-11-05T23:25:47.132Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-772"],"affected":[{"ranges":[{"version":">= 4.15.0, < 4.16.1","status":"affected"},{"version":">= 5.0.0, < 5.4.1","status":"affected"}],"vendor":"labstack","product":"echo","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.15.0","status":"affected","fixed":"4.16.1"}],"ecosystem":"Go","package":"github.com/labstack/echo/v4","purl":"pkg:golang/github.com/labstack/echo/v4","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.4.1"}],"ecosystem":"Go","package":"github.com/labstack/echo/v5","purl":"pkg:golang/github.com/labstack/echo/v5","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.15.0","status":"affected","fixed":"4.16.1"}],"ecosystem":"Go","package":"github.com/labstack/echo/v4","purl":"pkg:golang/github.com/labstack/echo/v4","source":"go"},{"ranges":[{"type":"semver","introduced":"5.0.0","status":"affected","fixed":"5.4.1"}],"ecosystem":"Go","package":"github.com/labstack/echo/v5","purl":"pkg:golang/github.com/labstack/echo/v5","source":"go"}],"references":[{"url":"https://github.com/labstack/echo/security/advisories/GHSA-9969-6676-49h5","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo/releases/tag/v4.16.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo/releases/tag/v5.4.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/labstack/echo","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-03T13:24:40.679Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-118262","url":"https://www.cve.org/CVERecord?id=CVE-2026-118262","licence":"CVE Terms of Use","modified":"2026-11-03T13:24:52.129Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-9969-6676-49h5","url":"https://github.com/advisories/GHSA-9969-6676-49h5","licence":"CC-BY-4.0","modified":"2026-11-05T23:25:47.132Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6838","url":"https://pkg.go.dev/vuln/GO-2026-6838","licence":"CC-BY-4.0","modified":"2026-11-05T23:25:47.132Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-118262","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118262","licence":"Public domain","modified":"2026-11-04T23:10:00.223Z"}],"updatedAt":"2026-11-25T22:59:47.669Z","epss":{"score":0.00378,"percentile":0.33826,"date":"2026-12-01T12:00:22.000Z"}}