{"schema":"threatline.record/2","record":{"id":"GHSA-9969-6676-49h5","aliases":["GHSA-9969-6676-49h5"],"summary":"Echo: WebSocket proxy can retain connections and handlers after client disconnect","details":"## 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.","categories":["Libraries & packages"],"product":"github.com/labstack/echo/v4","vendor":"","ecosystem":"go","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T20:50:18Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"ecosystem":"go","name":"github.com/labstack/echo/v4"},"range":">= 4.15.0, < 4.16.1"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T20:50:18Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"ecosystem":"go","name":"github.com/labstack/echo/v5"},"range":">= 5.0.0, < 5.4.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T21:00:05.235977221Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"name":"github.com/labstack/echo/v4","ecosystem":"Go","purl":"pkg:golang/github.com/labstack/echo/v4"},"ranges":[{"type":"SEMVER","events":[{"introduced":"4.15.0"},{"fixed":"4.16.1"}]}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T21:00:05.235977221Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"name":"github.com/labstack/echo/v5","ecosystem":"Go","purl":"pkg:golang/github.com/labstack/echo/v5"},"ranges":[{"type":"SEMVER","events":[{"introduced":"5.0.0"},{"fixed":"5.4.1"}]}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T20:50:18Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"ecosystem":"go","name":"github.com/labstack/echo/v4"},"version":"4.16.1"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T20:50:18Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"ecosystem":"go","name":"github.com/labstack/echo/v5"},"version":"5.4.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T21:00:05.235977221Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"name":"github.com/labstack/echo/v4","ecosystem":"Go","purl":"pkg:golang/github.com/labstack/echo/v4"},"version":"4.16.1"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-9969-6676-49h5","source_modified_at":"2026-10-23T21:00:05.235977221Z","fetched_at":"2026-10-23T21:10:45.942435Z","package":{"name":"github.com/labstack/echo/v5","ecosystem":"Go","purl":"pkg:golang/github.com/labstack/echo/v5"},"version":"5.4.1"}],"cvss":8.2,"severity":"High","kev":{"listed":false},"epss":{"probability":null,"percentile":null,"score_date":null},"published_at":"2026-10-23T20:50:17Z","modified_at":"2026-10-23T21:00:05.235977221Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-9969-6676-49h5","fetched_at":"2026-10-23T21:10:45.942435Z","source_modified_at":"2026-10-23T20:50:18Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-9969-6676-49h5","fetched_at":"2026-10-23T21:10:45.942435Z","source_modified_at":"2026-10-23T21:00:05.235977221Z"}],"sources":["GitHub Advisory Database","OSV"],"references":[{"url":"https://github.com/labstack/echo/security/advisories/GHSA-9969-6676-49h5","source":"GitHub Advisory Database"},{"url":"https://github.com/labstack/echo/commit/1855061e572ae9dab727c811d8382f266bfbaaec","source":"GitHub Advisory Database"},{"url":"https://github.com/labstack/echo/commit/3fb0ba7e17645bb65611e2a08875d0a2f65c421f","source":"GitHub Advisory Database"},{"url":"https://github.com/labstack/echo/releases/tag/v4.16.1","source":"GitHub Advisory Database"},{"url":"https://github.com/labstack/echo/releases/tag/v5.4.1","source":"GitHub Advisory Database"},{"url":"https://github.com/advisories/GHSA-9969-6676-49h5","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-23T21:00:05.235977221Z","content_hash":"0d4b083329a48c140064a9dd16af432d0b623e49b950c44ddcf580e23d2919e3"}}
