Sep 22, 2026·6 min read·21 visits
Unauthenticated remote attackers can crash sipgo-based services by transmitting a crafted SIP stream with an excessively large Content-Length header, causing the Go application to exhaust memory and terminate.
A high-severity denial of service vulnerability exists in the emiago/sipgo Go library when parsing stream-based SIP messages. The stream parser fails to validate declared Content-Length header sizes before initiating memory allocations, allowing remote, unauthenticated attackers to trigger process memory exhaustion and application crashes.
The Go library emiago/sipgo provides high-performance SIP services. Among its key processing components is the stream transport parser, implemented in sip/parser_stream.go as ParserStream. This component handles SIP signaling over stream-oriented network layers including TCP, TLS, WS, and WSS. It parses incoming network byte streams into structured SIP message objects for consumption by downstream application logic.
The attack surface is exposed directly to any network client capable of establishing a TCP or TLS connection with the SIP service. This exposure does not require any prior authentication or protocol handshake steps. Consequently, any network-exposed sipgo service using vulnerable stream-based transport configurations is accessible to unauthorized remote peers.
The specific vulnerability class is identified as CWE-789: Memory Allocation with Excessive Size Value, coupled with CWE-770: Allocation of Resources Without Limits or Throttling. This issue occurs when the parser reads the Content-Length header and attempts to allocate memory immediately without verification. The impact of this flaw is a complete denial of service through process termination caused by runtime panic or operating system out-of-memory intervention.
The root cause of this vulnerability lies in the sequential logic of the ParserStream.parseSingle() function within sip/parser_stream.go. During the processing of incoming stream-based messages, the parser reads the headers sequentially to extract the Content-Length value. This value represents the exact length in bytes of the incoming message body payload.
Upon reading this value, the code immediately initializes a new byte slice of the specified length using Go's make() function. The application attempts to allocate a contiguous memory buffer on the heap matching the parsed size. This allocation happens prior to verifying whether the declared length conforms to configured security limits.
If an attacker transmits a Content-Length header with an excessively large value, the application executes make([]byte, contentLength) with that value. Since no bound checks protect this operation, the Go runtime attempts to reserve the requested bytes immediately. When the requested memory size exceeds physical memory limits or system resource boundaries, the Go runtime triggers an unrecoverable out-of-memory panic, terminating the process.
The vulnerability was fixed in commit a7be60a07f48c06b3cdd5a7d35eb820b3df5736c. The vulnerability resided in the sip/parser_stream.go file inside the stream parser state loop.
Below is the code comparison showing the vulnerable path versus the patched path:
// Vulnerable Implementation
body := make([]byte, contentLength)
p.msg.SetBody(body)
p.state = stateContentThe vulnerable implementation immediately calls make([]byte, contentLength) without evaluating whether contentLength exceeds safe limits.
// Patched Implementation in v1.4.1
// avoid huge allocation if it will exceed message size
if (p.totalRead + contentLength) > p.p.MaxMessageLength {
return ErrMessageTooLarge
}
body := make([]byte, contentLength)
p.msg.SetBody(body)
p.state = stateContentIn the patched version, the stream parser evaluates the cumulative message length before allocation. If the sum of the bytes already read (p.totalRead) and the declared body length (contentLength) exceeds the defined MaxMessageLength, the parser returns ErrMessageTooLarge and aborts.
Security developers must verify that the calculation p.totalRead + contentLength does not overflow the system integer boundary. On 32-bit platforms, an integer overflow can wrap the result to a negative value, bypassing the threshold check. If that occurs, passing the negative value directly to make() will cause a runtime slice allocation panic, leading to process termination.
To exploit this vulnerability, an attacker must first establish a network connection to the target SIP service over TCP, TLS, or WebSockets. No authentication credentials or prior protocol registration sequences are required to initiate this step. The attacker only needs access to the raw network port running the SIP service.
Once the TCP connection is established, the attacker sends a partial SIP message containing standard headers followed by a crafted Content-Length header specifying a large integer, such as 2147483647. The message header block is terminated with a double carriage-return line-feed (\r\n\r\n) to signal the end of the header block to the parser.
Upon receiving the double line-feed, the ParserStream parser transitions to the body parsing state and immediately parses the declared Content-Length value. It then attempts to allocate a 2 GB buffer. The immediate resource exhaustion triggers an unrecoverable memory error, crashing the target SIP daemon.
The primary security impact of CVE-2026-58268 is a complete loss of availability for the affected SIP service. Because the unhandled memory allocation causes a runtime panic, the entire Go process terminates immediately. This results in an immediate teardown of active SIP sessions and denies signaling capabilities to legitimate users.
The vulnerability receives a CVSS v3.1 base score of 7.5, indicating high severity. The CVSS vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The attack vector is Network, complexity is Low, and no privileges or user interaction are required to execute the exploit.
Since this vulnerability resides in the network parsing layer of a Go-based SIP library, its exploitation status remains categorized as a proof-of-concept. No public reports indicate exploitation in ransomware or active cyber campaigns. However, due to the ease of exploitation, immediate remediation is strongly recommended.
The recommended remediation for CVE-2026-58268 is to upgrade the emiago/sipgo dependency to version 1.4.1 or later. This can be accomplished by updating the project's dependency modules. The Go command go get github.com/emiago/sipgo@v1.4.1 should be run inside the project root, followed by go mod tidy.
If an immediate library upgrade is not feasible, several defensive workarounds can reduce the risk of exploitation. Developers must ensure that the MaxMessageLength configuration parameter is explicitly initialized to a low, realistic value, such as 65535 bytes, rather than relying on uninitialized defaults.
At the network boundary, administrators can deploy firewalls or intrusion prevention systems to monitor SIP signaling traffic. Implementing rules that inspect TCP or TLS streams for unusually large Content-Length values in SIP signaling packets can prevent malicious payloads from reaching the target application. Setting the GOMEMLIMIT environment variable can also enforce memory boundaries on the Go runtime.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
sipgo emiago | < 1.4.1 | 1.4.1 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-789 |
| Attack Vector | Network (AV:N) |
| CVSS Score | 7.5 (High) |
| Exploit Status | Proof-of-Concept |
| CISA KEV Status | Not Listed |
| Remediation Status | Patched in v1.4.1 |
The product allocates memory based on an untrusted, large size value without performing validation, validation checks, or limiting the size of the allocation.
GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.
CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.
CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.
An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.
A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.
A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.