GHSA-jwjp-4649-v8jp: High severity nuget/SIPSorcery vulnerability

Published Aug 12, 2026
·
Updated

Summary SctpSackChunk.ParseChunk reads the numGapAckBlocks and numDuplicateTSNs fields (each up to 65535) directly from an attacker-controlled SCTP SACK chunk and loops that many times reading 4 bytes per iteration, with no validation of the counts against the chunk length or the receive buffer. A single crafted SACK chunk from a negotiated WebRTC peer forces reads past the end of the 262144-byte receive buffer, raising IndexOutOfRangeException, which is not caught by the recoverable handler and terminates the dedicated SCTP receive thread — permanently killing the SCTP association and all data channels.

Root Cause src/SIPSorcery/net/SCTP/Chunks/SctpSackChunk.cs: - ushort numGapAckBlocks = NetConvert.ParseUInt16(buffer, startPosn + 8); (:141) - ushort numDuplicateTSNs = NetConvert.ParseUInt16(buffer, startPosn + 10); (:142) - gap-ack loop (:146) and duplicate-TSN loop (:154) index the buffer via NetConvert.ParseUInt16/32 (buffer[posn], no bounds check — sys/Net/NetConvert.cs:30,41). SctpPacket.ParseChunks (SctpPacket.cs:195-203) only validates chunkLength >= 4 and posn+chunkLength <= length; the counts inside the value are never checked. RTCSctpTransport.DoReceive calls SctpPacket.Parse(recvBuffer, 0, bytesRead) on a reused recvBuffer = new byte[262144].

Impact IndexOutOfRangeException is a SystemException, not ApplicationException, so the recoverable catch (ApplicationException) { … continue; } at RTCSctpTransport.cs:345 is skipped and control falls to the generic catch (Exception) { … break; } at :356. The break exits the receive loop, DoReceive returns, and the dedicated receiveThread = new Thread(DoReceive) (:173, started once) exits with no restart → the SCTP association and every data channel are permanently dead (denial of service).

Proof of Concept A negotiated WebRTC peer (post-DTLS) sends a checksum-valid SCTP packet: 12-byte common header + a SACK chunk (type 3) with chunkLength=16, numGapAckBlocks=0xFFFF, numDuplicateTSNs=0xFFFF. CRC32C is attacker-computable. The gap-ack loop reaches buffer[262144] on a 262144-byte array (valid indices 0..262143) → IndexOutOfRangeException.

Attack Chain 1. Entry: post-DTLS negotiated peer sends a checksum-valid SCTP packet with a SACK chunk (chunkLength=16, numGapAckBlocks=0xFFFF). Guard: VerifyChecksum (CRC32C). Bypass: CRC32C is computable by the sender. 2. Processing: DoReceive (RTCSctpTransport.cs:286) reads into reused recvBuffer (262144 bytes, :280) → SctpPacket.Parse(recvBuffer, 0, bytesRead) (:302) → ParseChunks → SACK dispatch (SctpChunk.Parse :340-341) → SctpSackChunk.ParseChunk. Guard: ParseChunks checks only chunkLength>=4 and posn+chunkLength<=length (SctpPacket.cs:195-203). Bypass: chunkLength=16 is well-formed; the counts are never validated. 3. Sink: gap-ack loop (SctpSackChunk.cs:146) calls NetConvert.ParseUInt16(buffer, reportPosn) with reportPosn starting at startPosn(16)+FIXEDPARAMETERS(12)=28, climbing +4 each iteration. Guard: none on the count. Bypass: NetConvert.ParseUInt16 (NetConvert.cs:30) indexes buffer[posn] unchecked. 4. Impact: at iteration 65529, reportPosn = 28 + 655294 = 262144 → buffer[262144] → IndexOutOfRangeException → generic catch at RTCSctpTransport.cs:356 → break → receive thread exits, no restart → association permanently dead.

Bypass Evidence - Unchecked counts at SctpSackChunk.cs:141-142; loops at :146,:154. - NetConvert.ParseUInt16 unchecked indexing (NetConvert.cs:30). - ParseChunks validates only chunkLength (SctpPacket.cs:195-203). - OOB math: 28 + 655354 = 262168 > 262144; buffer is 262144 (DEFAULTADVERTISEDRECEIVEWINDOW, SctpAssociation.cs:62). numGapAckBlocks alone suffices — the dup-TSN loop is not needed. - DoReceive catch split: recoverable catch(ApplicationException) at :345 (continue) vs generic catch(Exception) at :356 (break); receiveThread started once at :176.

Affected Versions nuget:SIPSorcery <= 10.0.13 (verified present on release tag v10.0.13 and HEAD da944543).

Dedup NOT a duplicate of GHSA-qmvg-569h-hqrh — that fix (fe5a1fa) touched only SctpPacket.cs (the chunk-cursor zero-length infinite loop, CWE-835). This is a distinct out-of-bounds read (CWE-125) in SctpSackChunk count loops, untouched by that fix.

Suggested Fix Validate startPosn + FIXEDPARAMETERSLENGTH + numGapAckBlocks4 + numDuplicateTSNs4 <= posn + chunkLen before the loops, and/or make NetConvert.Parse bounds-checked, and/or treat IndexOutOfRangeException/ArgumentException as recoverable in DoReceive.

--- Reported by zx (Jace) — GitHub: @manus-use

Affected Software

1 affected componentFixes available
nuget/SIPSorcery<=10.0.13
10.0.14

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade nuget/SIPSorcery to a version that resolves this vulnerability.

    Fixed in 10.0.14
  2. Upgrade

    Upgrade nuget:SIPSorcery to a version that resolves this vulnerability.

    Fixed in 10.0.13
  3. Upgrade

    Upgrade nuget:SIPSorcery to a version that resolves this vulnerability.

    Patch fe5a1fa
  4. Configuration

    In RTCSctpTransport.cs, update DoReceive so that IndexOutOfRangeException thrown during SCTP SACK parsing (e.g., from SctpSackChunk count loops) is caught by the recoverable path (similar to the ApplicationException handler) so the dedicated _receiveThread does not terminate and the SCTP association/data channels are not permanently dead.

    SIPSorcery RTCSctpTransport.DoReceive catch behavior for IndexOutOfRangeException = treat SystemException (IndexOutOfRangeException) as recoverable (continue) instead of generic catch(Exception) (break)
  5. Configuration

    In src/SIPSorcery/net/SCTP/Chunks/SctpSackChunk.cs, validate that startPosn + FIXED_PARAMETERS_LENGTH + numGapAckBlocks*4 + numDuplicateTSNs*4 is within the available chunk data (posn + chunkLen) and within the receive buffer before entering the gap-ack loop and duplicate-TSN loop.

    SIPSorcery SCTP SctpSackChunk.ParseChunk bounds validation for count-driven loops = validate before looping

Event History

Aug 12, 2026
Advisory Published
via GitHub·07:30 PM
Data Sourced
via GitHub·07:30 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-jwjp-4649-v8jp?

The severity of GHSA-jwjp-4649-v8jp is rated as high with a score of 7.5.

2

What vulnerabilities does GHSA-jwjp-4649-v8jp exploit?

GHSA-jwjp-4649-v8jp exploits a safety issue in the `SctpSackChunk.ParseChunk` method by reading attacker-controlled fields without proper validation.

3

How do I fix GHSA-jwjp-4649-v8jp?

To fix GHSA-jwjp-4649-v8jp, update the SIPSorcery package to the latest version with the relevant security patches.

4

What risks are associated with GHSA-jwjp-4649-v8jp?

The risks associated with GHSA-jwjp-4649-v8jp include potential denial of service attacks due to uncontrolled iteration based on attacker-controlled data.

5

Is GHSA-jwjp-4649-v8jp present in all versions of SIPSorcery?

GHSA-jwjp-4649-v8jp affects specific versions of the SIPSorcery library, so it's important to verify the version in use.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203