CVE-2026-58268: SIPGO Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-pg59-5vwg-4jxq
CVSS 7.5
CWE-789
Published
Advisory Summary

CVE-2026-58268 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-789: Memory Allocation with Excessive Size Value) affecting SIPGO libraries in the Go ecosystem. The issue involves dos via unvalidated content-length in the stream parser. Remediation is available by upgrading affected packages to version 1.4.1.

CVE-2026-58268 at a Glance

CVE Identifier CVE-2026-58268
GHSA Identifier GHSA-pg59-5vwg-4jxq
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-789: Memory Allocation with Excessive Size Value
Affected Product SIPGO
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-58268

To remediate this vulnerability, upgrade all affected SIPGO dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/emiago/sipgo fixed: 1.4.1
Upgrade github.com/emiago/sipgo to 1.4.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/emiago/sipgo

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-58268, inspect your project dependencies for SIPGO:

inspect dependencies for github.com/emiago/sipgo

Analyze the terminal output to locate any version of SIPGO in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-789: Memory Allocation with Excessive Size Value, where the product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated. In SIPGO, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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:victim@example.com SIP/2.0 Via: SIP/2.0/TCP attacker.example;branch=z9hG4bK1 From: <sip:attacker@attacker.example>;tag=1 To: <sip:victim@example.com> Call-ID: 1@attacker.example 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.

CVE-2026-58268 Affected SIPGO Versions

1 component(s)
Fixed Versions:
1.4.1
Product / Package Ecosystem Affected Versions Fixed Version
github.com/emiago/sipgo
Go
< 1.4.1
1.4.1

References

Frequently Asked Questions

What is CVE-2026-58268?
CVE-2026-58268 is a security vulnerability in SIPGO involving DoS via unvalidated Content-Length in the stream parser under CWE-789: Memory Allocation with Excessive Size Value.
Which SIPGO versions are affected?
Affected versions include releases prior to 1.4.1 across affected packages: github.com/emiago/sipgo.
What version fixes CVE-2026-58268?
Upgrading to 1.4.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/emiago/sipgo affected?
Yes, github.com/emiago/sipgo is affected in releases prior to 1.4.1. Upgrade your dependency to 1.4.1 or later.
What is the CVSS score of CVE-2026-58268?
CVE-2026-58268 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-58268?
CVE-2026-58268 is classified under CWE-789: Memory Allocation with Excessive Size Value (The product allocates memory based on an untrusted, large size value, but it does not ensure that the size is within expected limits, allowing arbitrary amounts of memory to be allocated.).
How can I check Go dependencies for CVE-2026-58268?
Run the dependency tree command: 'inspect dependencies for github.com/emiago/sipgo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pg59-5vwg-4jxq",
  "modified" : "2026-09-22T19:57:52Z",
  "published" : "2026-09-22T19:57:51Z",
  "aliases" : [ "CVE-2026-58268" ],
  "summary" : "SIPGO: DoS via unvalidated Content-Length in the stream parser",
  "details" : "### Summary\n\nThe stream parser allocates the SIP body buffer from the `Content-Length` header before validating its size, which can lead to an unauthenticated DoS.\n\n### Details\n\n`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):\n\n```go\nbody := make([]byte, contentLength)   // contentLength is client-controlled, up to 2^32-1 (uint32)\n```\n\nThe `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.\n\n### PoC\n\nTested on emiago/sipgo v1.4.0 (latest).\n\nSend a single message with a large `Content-Length` and no body to a SIP server:\n\n```\nINVITE sip:victim@example.com SIP/2.0\nVia: SIP/2.0/TCP attacker.example;branch=z9hG4bK1\nFrom: <sip:attacker@attacker.example>;tag=1\nTo: <sip:victim@example.com>\nCall-ID: 1@attacker.example\nCSeq: 1 INVITE\nContent-Length: 4000000000                     // <- a large Content-Length\n\n```\n\n### Suggested Fix\n\nValidate `contentLength` against `ParseMaxMessageLength` before the allocation.\n\n### Impact\n\nUnauthenticated DoS. Any service using `sipgo` with a stream transport (TCP/TLS/WS/WSS) can be forced to run out of memory.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/emiago/sipgo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.4.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/emiago/sipgo/security/advisories/GHSA-pg59-5vwg-4jxq"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/emiago/sipgo/commit/a7be60a07f48c06b3cdd5a7d35eb820b3df5736c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/emiago/sipgo"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/emiago/sipgo/releases/tag/v1.4.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-789" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-22T19:57:51Z",
    "nvd_published_at" : null
  }
}