GoSeverity: MediumStatus: Published
Unauthenticated RTSP-over-HTTP/WebSocket tunnel detection has no read deadline or size limit, allowing memory exhaustion and connections held open indefinitely
Tunnel detection on a new TCP connection ran before any read deadline, and the HTTP request was parsed with http.ReadRequest(), which does not limit the request line or headers (CWE-400, CWE-770). An unauthenticated client could hold the connection open indefinitely, or stream an endless request line or header and exhaust memory, including in an application that embeds the server such as MediaMTX. The WebSocket path used ReadMessage() without SetReadLimit(). Module github.com/bluenviron/gortsplib/v5 versions >= 5.0.0, < 5.7.0 are affected. Patched in 5.7.0. There is no CVE and no CVSS score. The advisory credits ucsurf as reporter. Fixed by Alessandro Ros (@aler9).
Impact
Every new TCP connection accepted by a gortsplib.Server is checked for an RTSP-over-HTTP or RTSP-over-WebSocket tunnel before any read deadline is set. IdleTimeout and ReadTimeout are not applied to that step. The HTTP request is parsed with http.ReadRequest(), which does not limit the length of the request line or the headers (CWE-400, CWE-770). The regular RTSP parser does cap those sizes.
An unauthenticated client can open a connection and send nothing, or send a partial HTTP request, and keep the connection open. A client can also send an endless request line or header. The server keeps buffering it. Opening several connections can exhaust the memory of the process, including an application that embeds the server, such as MediaMTX.
On the WebSocket path, messages were read with ReadMessage() without SetReadLimit().
Affected versions and fix
Module github.com/bluenviron/gortsplib/v5, versions >= 5.0.0 and < 5.7.0, is affected. The patched release is 5.7.0.
Alessandro Ros (@aler9) fixed this in pull request 1215, pull request 1216 and pull request 1217, merged on 2026-11-13. Those pull requests set a read deadline before tunnel detection, bound the HTTP request read during detection, and limit the size of RTSP-over-WebSocket messages. The tag is v5.7.0, dated 2026-11-15.
The published advisory is GHSA-vq7q-jf68-hhhp. GitHub rates it medium. There is no CVSS score and no CVE. Alessandro Ros published the advisory on 2026-12-02. It was reported on 2026-10-08 through GitHub private vulnerability reporting. The advisory credits ucsurf as reporter. Fixed by Alessandro Ros (@aler9).
Timeline
- Found
- Reported via private vulnerability report
- Advisory published
- Entry last updated
Machine-readable: JSON · Markdown · ID security/go/bluenviron__gortsplib/2026-10-08-tunnel-detection-unbounded-read
If this work is useful to you, you can support it on Buy Me a Coffee.