Summary
A malformed-input handling vulnerability in SIPSorcery can cause an active RTP or WebRTC media session to terminate when specially formed short RTP or STUN data reaches the shared RTP/ICE socket. A remote unauthenticated party who can reach or discover the advertised ephemeral port may trigger a denial of service, although the impact is limited to availability.
Affected context
The issue affects SIPSorcery deployments using RTP and ICE networking paths that parse packet-controlled bytes from a shared RTP/ICE socket. It is most relevant before DTLS or STUN MESSAGE-INTEGRITY verification has completed, when malformed traffic may reach parsing logic without prior authenticity checks. Versions prior to 10.0.9 are within the reported affected range.
Exploit preconditions
- Attack surface: Network-reachable RTP/ICE UDP socket - Required access: Ability to send packets to, or discover, the advertised
ephemeral RTP/ICE port
- Authentication: None required - User interaction: None required - Trigger point: RTP packet receipt or STUN address-attribute parsing during
media setup or ICE connectivity checks
- Why exploitation is possible: Parser paths index untrusted bytes without
sufficient length validation, and a resulting non-socket exception can cause
the receiver to close the channel
Why this happens
The underlying bug is insufficient validation of attacker-controlled packet lengths before accessing indexed byte positions in RTP and STUN parsing routines. This maps primarily to CWE-20, Improper Input Validation, because malformed input is processed as though the required structure were present. The resulting exception-handling behavior also relates to CWE-755, Improper Handling of Exceptional Conditions, because a parsing failure can terminate the receiving channel rather than being isolated as invalid input.
Potential impact
- An attacker may terminate an active RTP media session.
- A WebRTC call or media connection could become unavailable.
- ICE connectivity checks could be disrupted before session establishment.
- Repeated malformed traffic could cause recurring service interruption.
- Dependent applications may experience availability loss without data disclosure.
General mitigation guidance
Mitigation generally focuses on validating packet lengths before every indexed read, treating malformed RTP and STUN messages as discardable input, and isolating parser failures from long-lived receiver channels. Secure-by-default designs should perform structural and bounds validation before deeper parsing or authentication-dependent processing, while preserving channel availability when individual packets are invalid. Deployments can also reduce exposure by limiting reachable RTP/ICE ports, separating media networking where practical, applying rate and source controls, and running services with only the privileges needed for media handling.
How teams detect issues like this
Detection approaches include static-analysis rules for byte-array indexing without preceding length checks, review of exception paths that close or stop network receivers, and tests using truncated, empty, and structurally invalid RTP or STUN inputs. Code review should examine all pre-authentication parsing paths and shared socket handlers. Runtime monitoring can alert on unexpected RTP-channel closures, repeated parser exceptions, and abnormal bursts of malformed UDP traffic. Automated security testing and neutral code-analysis tools may help identify these patterns during CI review.

