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.
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.
CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.
CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.
CVE-2026-62300 is an uncontrolled resource consumption vulnerability (CWE-400) affecting the daemon mode of filecoin-pin in versions up to and including 1.1.0. The daemon implements the IPFS Pinning Service API to store content on Filecoin's Proof of Data Possession (PDP) service. Due to the absence of rate limits, concurrency caps, execution timeouts, and Directed Acyclic Graph (DAG) traversal limits, an authenticated user—or an unauthenticated user when authentication is disabled—can exhaust system resources via crafted POST /pins requests.