Summary
MERCURY MIPC252W IP camera firmware 1.0.5 Build 230306 Rel.79931n contains an improper authentication flaw in its RTSP service where only the initial DESCRIBE request enforces full HTTP Digest verification.
Subsequent RTSP methods like SETUP, PLAY, and TEARDOWN are accepted even with empty or invalid Digest responses, allowing an attacker with network access to hijack an existing RTSP session and issue unauthorized control commands.
Affected context
The vulnerability occurs in the RTSP control channel of MERCURY MIPC252W IP cameras running firmware 1.0.5 Build 230306 Rel.79931n.
It manifests in environments where RTSP access is exposed over local networks or remotely (e.g., through port forwarding, VPN, or shared surveillance networks).
The issue appears when the camera's RTSP service successfully completes an initial Digest-authenticated DESCRIBE request and then continues the session without consistently validating the Digest "response" parameter on follow-up RTSP methods.
Systems that reuse RTSP sessions for streaming and rely on Digest authentication as the primary access control are particularly affected.
Exploit preconditions
- Attack surface: RTSP service exposed by the camera, typically on the local network or via any externally reachable RTSP endpoint.
- Required access: Network-level ability to reach the camera's RTSP port and observe or infer active RTSP sessions (e.g., via same LAN, pivoted access, or shared surveillance subnet).
- Session dependency: A valid RTSP session must already exist where an initial DESCRIBE request completed with correct Digest authentication.
- Trigger point: The attacker sends RTSP requests (e.g., SETUP, PLAY, TEARDOWN) reusing the known or captured nonce and session identifier, but with an empty or invalid Digest "response" value.
- Why exploitation is possible: The RTSP implementation only verifies the Digest "response" parameter during the initial DESCRIBE request and does not re-validate it for subsequent RTSP methods within the same session, effectively bypassing ongoing authentication checks.
Why this happens
This vulnerability stems from incomplete and inconsistent enforcement of HTTP Digest authentication across RTSP methods, aligning with CWE-287: Improper Authentication.
Instead of treating each sensitive RTSP operation as requiring a valid, method-specific Digest computation, the implementation relies on the existence of a previously authenticated session and validates only the nonce and session identifier.
By skipping verification of the Digest "response" parameter for SETUP, PLAY, TEARDOWN, and other methods, the RTSP service assumes that possession of session metadata alone is sufficient proof of identity.
Abstractly, this reflects a broken authentication pattern where:
- Authentication is performed only at session establishment, not per-request for privileged operations.
- Session identifiers and nonces are treated as static tokens, not as inputs to a robust, per-message MAC.
- The security properties of Digest authentication are undermined by treating critical fields as optional in follow-up requests.
Potential impact
- Unauthorized control of RTSP streams, including starting, stopping, or tearing down live video sessions.
- Hijacking of existing RTSP sessions to view or redirect camera feeds, depending on deployment and client behavior.
- Disruption of surveillance and monitoring operations by issuing TEARDOWN or conflicting SETUP/PLAY commands.
- Facilitation of broader attack chains by combining stream manipulation with social engineering or physical intrusion (e.g., disabling viewing during a break-in).
- Potential use of predictable session behavior to script automated abuse across multiple cameras on the same network.
General mitigation guidance
Mitigation generally focuses on strengthening authentication enforcement and reducing the exposure of the RTSP service:
- Treat each RTSP method that impacts stream state (e.g., SETUP, PLAY, TEARDOWN) as requiring full authentication and integrity checks, rather than relying solely on existing session state.
- Ensure Digest authentication is consistently applied, validating all relevant parameters (including the "response" field) on every authenticated RTSP request.
- Restrict RTSP access to trusted network segments, for example by placing cameras behind firewalls or VPN gateways and avoiding direct Internet exposure.
- Harden session handling by using unpredictable session identifiers and nonces with appropriate lifetimes, minimizing opportunities for reuse or replay.
- Apply least-privilege principles to monitoring clients and management interfaces, limiting which endpoints can initiate or control RTSP sessions.
- Where possible, layer additional protections such as TLS (RTSPS) or network-level access control lists to reduce reliance on a single authentication mechanism.
How teams detect issues like this
Detection efforts can focus on both code-level and operational indicators:
- Static analysis and code review:
- Examine RTSP authentication handlers to verify that Digest verification logic is invoked for all methods that require authorization, not just for DESCRIBE.
- Look for conditionals that bypass or short-circuit Digest validation when a session identifier is present.
- Flag any code paths where Authorization headers are parsed but the Digest "response" field is not validated or is allowed to be empty.
- Configuration and architectural review:
- Identify cameras or RTSP services exposed beyond intended network boundaries, such as being reachable from guest VLANs or the public Internet.
- Check for reliance on RTSP Digest authentication as the sole access control without additional network segmentation.
- Runtime and traffic monitoring:
- Monitor RTSP traffic for patterns where SETUP/PLAY/TEARDOWN requests include malformed, empty, or repeated Digest response values that are still accepted.
- Use network intrusion detection rules to flag RTSP control commands lacking valid authentication artifacts, especially when originating from unusual sources.
- Automated tools, including security scanners and custom scripts, can assist by sending RTSP requests with deliberately invalid Digest responses and observing whether the device still processes them.

