Summary
An input validation flaw in the RTSP service of MERCURY MIPC252W allows malformed requests with a declared Content-Length but no body to place the parser into an indefinite body-waiting state.
A remote, unauthenticated attacker can abuse this behavior to consume and stall individual TCP connections until the server times them out, temporarily denying service on those connections.
Affected context
This vulnerability occurs in the RTSP service of MERCURY MIPC252W devices when handling incoming RTSP requests that include a Content-Length header.
The parser assumes that a corresponding message body will follow and does not validate that the body is present or consistent with the header.
As a result, when a client sends such a malformed request and then continues sending data, the service treats subsequent bytes on that TCP connection as body content until a server-side timeout is reached.
Exploit preconditions
- Attack surface: Network-exposed RTSP service on the MIPC252W device
- Required access: None; the RTSP endpoint is reachable without authentication
- Trigger point: Sending an RTSP request containing a
Content-Lengthheader without a matching message body - Why exploitation is possible: The RTSP parser transitions into a body-waiting state solely based on the header, failing to enforce sanity checks on message framing and allowing the connection to be tied up until timeout
Why this happens
The underlying issue is improper input validation (CWE-20) in the RTSP request parser, specifically in how it interprets and trusts the Content-Length header.
Instead of validating that the specified length is satisfied by the incoming payload, the implementation assumes the header is correct and transitions into a state where it indefinitely consumes data as body content.
This lack of validation on message completeness and framing allows a single malformed request to monopolize the connection and prevents proper processing of subsequent protocol data on that TCP channel.
Potential impact
- Individual TCP connections to the RTSP service can be held in a waiting state until server-side timeout
- Remote attackers can cause temporary denial of service on targeted connections
- Resource consumption on the device may increase due to many concurrent stalled connections
- RTSP streaming sessions or control channels can become unreliable or unavailable under sustained attack
General mitigation guidance
Mitigation generally focuses on tightening message parsing and reducing trust in client-supplied headers.
Useful patterns include:
- Validating that
Content-Lengthis consistent with the actual number of bytes received and rejecting requests that cannot be satisfied within reasonable bounds - Implementing strict state machines for RTSP message parsing that promptly abort malformed requests rather than waiting indefinitely
- Enforcing per-connection and per-client limits on pending requests, body size, and wait times to prevent long-lived half-open transactions
- Applying conservative timeouts and connection caps at the transport layer so that misbehaving connections cannot starve legitimate traffic
How teams detect issues like this
Detection can leverage both network- and code-centric approaches:
- Network monitoring for RTSP connections that remain active but idle in terms of completed requests, especially with mismatched
Content-Lengthusage - Logging and alerting on parse errors, incomplete RTSP messages, or repeated timeouts triggered while waiting for request bodies
- Static or manual review of RTSP parsing code for assumptions that trust header values without verifying message completeness
- Automated testing that fuzzes RTSP headers and body framing to surface cases where the parser becomes stuck or fails to reject malformed input

