Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

SIPGO: DoS via unvalidated Content-Length in the stream parser

Historical advisory saved 24 Oct 2026 13:19:41 UTC. The publisher may have updated it since then. Latest advisory.

osv · GHSA-pg59-5vwg-4jxq

Published

### Summary The stream parser allocates the SIP body buffer from the `Content-Length` header before validating its size, which can lead to an unauthenticated DoS. ### Details `ParserStream.parseSingle` allocates the body buffer from the declared `Content-Length` with no size check (https://github.com/emiago/sipgo/blob/v1.4.0/sip/parser_stream.go#L195): ```go body := make([]byte, contentLength) // contentLength is client-controlled, up to 2^32-1 (uint32) ``` The `ParseMaxMessageLength` (65535) check is in the caller `ParseNext` (https://github.com/emiago/sipgo/blob/v1.4.0/sip/parser_stream.go#L132), and only runs after `parseSingle` has already allocated the buffer. ### PoC Tested on emiago/sipgo v1.4.0 (latest). Send a single message with a large `Content-Length` and no body to a SIP server: ``` INVITE sip:[email protected] SIP/2.0 Via: SIP/2.0/TCP attacker.example;branch=z9hG4bK1 From: <sip:[email protected]>;tag=1 To: <sip:[email protected]> Call-ID: [email protected] CSeq: 1 INVITE Content-Length: 4000000000 // <- a large Content-Length ``` ### Suggested Fix Validate `contentLength` against `ParseMaxMessageLength` before the allocation. ### Impact Unauthenticated DoS. Any service using `sipgo` with a stream transport (TCP/TLS/WS/WSS) can be forced to run out of memory.

Source published
22 Sep 2026 19:57:51 UTC
Source modified
1 Oct 2026 20:55:47 UTC
Saved here
24 Oct 2026 13:19:41 UTC
Source terms
GitHub Advisory Database · CC-BY-4.0

Original source record · Cite this exact observation · Complete original publisher JSON

Source: osv · GitHub Advisory Database · CC-BY-4.0. The publisher's wording is preserved. ChangeIntel groups the information and labels changes. The JSON record includes additional source fields.

CVSS_V3 · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Publisher rating · HIGH

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 18 Nov 22:28 UTC · 273 of 275 readable · 270 fully read · documentation 469/469 current