{"id":"CVE-2026-77322","aliases":["CVE-2026-77322","GHSA-8h6x-h86x-75wh","GO-2026-6559"],"related":[],"kind":"vulnerability","state":"published","title":"SIPGO: DoS via unvalidated WebSocket frame length","summary":"SIPGO is a library for writing SIP services in the GO language. Prior to 1.4.3, WSConnection.Read in sip/transport_ws.go creates a wsutil.Reader without setting MaxFrameSize, allowing NextFrame to accept a client-controlled header.Length before ParseMaxMessageLength is applied. An unauthenticated WS or WSS peer can send a frame header declaring an extremely large payload, causing an oversized allocation or a makeslice length panic before the payload is read and crashing or exhausting memory in the server process. This issue is fixed in version 1.4.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"SIPGO is a library for writing SIP services in the GO language. Prior to 1.4.3, WSConnection.Read in sip/transport_ws.go creates a wsutil.Reader without setting MaxFrameSize, allowing NextFrame to accept a client-controlled header.Length before ParseMaxMessageLength is applied. An unauthenticated WS or WSS peer can send a frame header declaring an extremely large payload, causing an oversized allocation or a makeslice length panic before the payload is read and crashing or exhausting memory in the server process. This issue is fixed in version 1.4.3.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe WebSocket transport allocates a buffer from the frame payload length before validating its size, which can lead to an unauthenticated DoS.\n\n### Details\n\n`WSConnection.Read` allocates a buffer from the declared WebSocket frame length before reading the payload (https://github.com/emiago/sipgo/blob/v1.4.0/sip/transport_ws.go#L400):\n\n```go\ndata := make([]byte, header.Length)   // header.Length is client-controlled, up to 2^63-1 (int64)\n```\n\n- `NextFrame()` reads only the frame header and never checks the length: `wsutil.NewReader` is created with no [`MaxFrameSize`](https://pkg.go.dev/github.com/gobwas/ws@v1.3.2/wsutil#Reader.MaxFrameSize) (`0` = unlimited). `ParseMaxMessageLength` applies only downstream, not here.\n- A value above the max slice size (e.g. `2^63-1`) panics `make`. sipgo does not recover from this panic, so it crashes the whole server process.\n\n### PoC\n\nTested on emiago/sipgo v1.4.0 (latest).\n\nAfter a normal WebSocket handshake, send one masked text frame consisting of the header only (no payload), declaring a huge length. The allocation runs as soon as the header is read.\n\n```\n0x81                                            FIN + text opcode\n0xFF                                            MASK bit + length marker 127 (8-byte length follows)\n0x7F FF FF FF FF FF FF FF                        declared length = 2^63-1  ->  make panics (crash)\n<4-byte masking key>\n(no payload)\n```\n\nThis crashes the server process:\n\n```\npanic: runtime error: makeslice: len out of range\n\ngoroutine 23 [running]:\ngithub.com/emiago/sipgo/sip.(*WSConnection).Read(...)\n        /path/to/pkg/mod/github.com/emiago/sipgo@v1.4.0/sip/transport_ws.go:400 +0x2df\ngithub.com/emiago/sipgo/sip.(*TransportWS).readConnection(...)\n        /path/to/pkg/mod/github.com/emiago/sipgo@v1.4.0/sip/transport_ws.go:194 +0x266\ncreated by github.com/emiago/sipgo/sip.(*TransportWS).initConnection in goroutine 21\n        /path/to/pkg/mod/github.com/emiago/sipgo@v1.4.0/sip/transport_ws.go:167 +0x268\n```\n\n### Suggested Fix\n\nSet [`MaxFrameSize`](https://pkg.go.dev/github.com/gobwas/ws@v1.3.2/wsutil#Reader.MaxFrameSize) on the `wsutil.NewReader`.\n\n### Impact\n\nUnauthenticated DoS. Any service using `sipgo` with a WS/WSS transport can be crashed by a single frame (panic), or forced to run out of memory.","format":"markdown","source":"ghsa"},{"lang":"en","text":"SIPGO: DoS via unvalidated WebSocket frame length in github.com/emiago/sipgo","format":"markdown","source":"go"}],"published":"2026-09-22T19:52:12.441Z","modified":"2026-10-01T20:56:11.724Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-789"],"affected":[{"ranges":[{"version":"< 1.4.3","status":"affected"}],"vendor":"emiago","product":"sipgo","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.4.3"}],"ecosystem":"Go","package":"github.com/emiago/sipgo","purl":"pkg:golang/github.com/emiago/sipgo","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.4.3"}],"ecosystem":"Go","package":"github.com/emiago/sipgo","purl":"pkg:golang/github.com/emiago/sipgo","source":"go"}],"references":[{"url":"https://github.com/emiago/sipgo/security/advisories/GHSA-8h6x-h86x-75wh","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/emiago/sipgo/commit/769e4bc958376e2363566c8f7042202b410becdc","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/emiago/sipgo/releases/tag/v1.4.3","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/emiago/sipgo","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-09-23T15:07:56.457Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-77322","url":"https://www.cve.org/CVERecord?id=CVE-2026-77322","licence":"CVE Terms of Use","modified":"2026-09-23T15:08:21.990Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8h6x-h86x-75wh","url":"https://github.com/advisories/GHSA-8h6x-h86x-75wh","licence":"CC-BY-4.0","modified":"2026-10-01T20:56:11.724Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-6559","url":"https://pkg.go.dev/vuln/GO-2026-6559","licence":"CC-BY-4.0","modified":"2026-10-01T20:45:13.179Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-77322","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77322","licence":"Public domain","modified":"2026-09-23T18:12:04.247Z"}],"updatedAt":"2026-11-25T22:59:40.540Z","epss":{"score":0.00524,"percentile":0.45919,"date":"2026-12-01T12:00:22.000Z"}}