Summary
SIPSorcery: Malformed UDP datagram crashes TurnServer receive loop with no restart, disabling TURN UDP relay for all clients (DoS)
TurnServer.ReceiveUdpAsync places its generic catch (Exception) OUTSIDE the while receive loop, and Start() launches the loop fire-and-forget with no supervision or restart. A single pre-authentication UDP datagram whose STUN header first byte is in 0x80–0xFF causes STUNHeader.ParseSTUNHeader to throw ApplicationException, which unwinds past the loop and terminates it. The TURN UDP relay is then dead for ALL clients until the process is restarted.
Root Cause
src/SIPSorcery/net/TURN/TurnServer.cs:
ReceiveUdpAsync(:555-577): the innertry(:562-567) wraps only_udpSocket.ReceiveAsync();HandleUdpDatagram(result.Buffer, result.RemoteEndPoint)(:569) is inside thewhilebody but OUTSIDE that inner try. The genericcatch (Exception ex)(:573) is lexically OUTSIDE thewhile.Start()does_ = ReceiveUdpAsync();(:381), fire-and-forget, no restart.HandleUdpDatagram(:579) callsSTUNMessage.ParseSTUNMessage(data, data.Length)(:600) for any non-ChannelData datagram;ParseSTUNMessage(STUNMessage.cs:94) has no try/catch.
Proof of Concept
Send one UDP datagram to the TURN port (default 3478) with first byte 0x80 (e.g. 80 00 00 00). 0x80 & 0xC0 = 0x80 ≠ 0x40 → not ChannelData → ParseSTUNMessage → ParseSTUNHeader executes if ((Array[startIndex] & 0xC0) != 0) throw new ApplicationException(...) (STUNHeader.cs:169-172); 0x80 & 0xC0 = 0x80 ≠ 0 → throws.
Attack Chain
- Entry: one UDP datagram to the TURN port, first byte
0x80–0xFF. Guard: ChannelData branch requires(data[0] & 0xC0) == 0x40(:583). Bypass:0x80 & 0xC0 = 0x80 ≠ 0x40→ falls through toParseSTUNMessage(:600). - Sink:
STUNMessage.ParseSTUNMessage→STUNHeader.ParseSTUNHeader(STUNHeader.cs:169-172) throwsApplicationException. Guard: none before the throw;ParseSTUNMessagehas no try/catch. Bypass:0x80 & 0xC0 = 0x80 ≠ 0→ throws. - Impact: exception unwinds past the
whileintocatch(Exception)at :573 → logged → method returns → loop exits. Guard: none, no restart (Start():381 fire-and-forget). Bypass: N/A. TURN UDP relay dead for all clients until process restart.
Bypass Evidence
- Loop/catch structure: catch at TurnServer.cs:573 is outside the
whileat :559;HandleUdpDatagramat :569 is outside the inner try (:562-567). - Unguarded
ParseSTUNMessageat :600; throw at STUNHeader.cs:169-172. - Fire-and-forget start at :381 with no restart in
Start(). TurnServerConfig.ListenAddressdefaults toIPAddress.Loopback(:42), but a functioning TURN server must bind a routable address to serve clients, so real deployments are exposed. Non-default config narrows the vulnerable population, not the attack difficulty → AC:L.
Affected Versions
nuget:SIPSorcery <= 10.0.13 (TurnServer component present since 10.0.5; verified on release tag v10.0.13 and HEAD).
Dedup
NOT a duplicate of GHSA-28gm-jrmw-xx93 (CVE-2026-54632), which covers the client RTP/ICE socket (UdpReceiver/RTPChannel). TurnServer is a distinct shipped RFC 5766 server component with its own loop and fix location.
Impact
ApplicationException propagates out of the while, is caught at :573, logged, and the method returns. _running remains true but nothing re-invokes ReceiveUdpAsync → TURN UDP relay permanently unavailable for all clients (whole-server DoS). Pre-authentication: STUN parsing precedes any TURN allocation/credential check.
GHSA-PFVM-W89X-94JW has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (10.0.14); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Wrap HandleUdpDatagram in a per-datagram try/log-and-continue INSIDE the while (matching the drop-and-continue intent of fix bdb76cb), and/or add loop supervision/restart.
Reported by zx (Jace), GitHub: @manus-use
Frequently Asked Questions
- What is GHSA-PFVM-W89X-94JW? GHSA-PFVM-W89X-94JW is a high-severity security vulnerability in SIPSorcery (nuget), affecting versions >= 10.0.5, <= 10.0.13. It is fixed in 10.0.14.
- How severe is GHSA-PFVM-W89X-94JW? GHSA-PFVM-W89X-94JW has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of SIPSorcery are affected by GHSA-PFVM-W89X-94JW? SIPSorcery (nuget) versions >= 10.0.5, <= 10.0.13 is affected.
- Is there a fix for GHSA-PFVM-W89X-94JW? Yes. GHSA-PFVM-W89X-94JW is fixed in 10.0.14. Upgrade to this version or later.
- Is GHSA-PFVM-W89X-94JW exploitable, and should I be worried? Whether GHSA-PFVM-W89X-94JW is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-PFVM-W89X-94JW is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-PFVM-W89X-94JW? Upgrade
SIPSorceryto 10.0.14 or later.