CVE-2026-45538: OpenSIPS: Stack Buffer Overflow in sip_to_json() Header Name Copy
OpenSIPS is a Session Initiation Protocol (SIP) server implementation. In versions 4.0.0 and prior, processing a SIP message with a header name longer than 255 bytes causes a stack buffer overflow when sip_to_json() is called in the routing script. Function sip_to_json() (modules/sipmsgops/sipmsgops.c) copies SIP header names into a fixed 255-byte stack buffer without bounds checking, performing a memcpy of the full header-name length even though the SIP parser imposes no such limit (a header name can be roughly 65000 bytes). As a result, when a routing script calls sip_to_json(), a SIP message with a header name longer than 255 bytes triggers a stack buffer overflow in which both the length and content of the overwrite are attacker-controlled, corrupting the saved frame pointer and return address. A single unauthenticated UDP packet to the SIP port (5060) can crash the process or, on builds without stack protections, hijack the return address to achieve remote code execution. This affects deployments whose routing script invokes sip_to_json(). This issue was not fixed at the time of publication.
Security readout for executives and security teams
Plain-English summary
A specially crafted SIP message can crash certain OpenSIPS servers and may permit remote code execution. Exposure requires OpenSIPS 4.0.0 or earlier and a routing script that calls sip_to_json(). An attacker may need only unauthenticated network access to the SIP service. No fix was available when the cited record was published.
Executive priority
Prioritize immediate exposure assessment and containment for externally reachable SIP infrastructure. A single unauthenticated packet may disrupt voice or communications services, and some builds may face code-execution risk. Because no fix was reported at publication, reduce reachability and vulnerable function use while tracking vendor guidance closely.
Technical view
sip_to_json() copies an unrestricted SIP header name into a fixed 255-byte stack buffer. Header names exceeding 255 bytes can overwrite stack control data with attacker-controlled length and content. The reported path is remotely reachable through SIP, including one UDP packet to port 5060, but only when routing invokes sip_to_json(). Stack protections may limit impact to process termination.
Likely exposure
Highest risk applies to internet-accessible or otherwise untrusted SIP listeners running OpenSIPS 4.0.0 or earlier whose routing configuration invokes sip_to_json(). Deployments not calling that function are outside the described vulnerable path. Internal services may still be exposed through compromised hosts or untrusted network segments.
Exploitation context
The sources describe low-complexity, unauthenticated remote triggering, with denial of service and possible code execution on builds lacking stack protections. The CVE is not identified as a CISA KEV entry in the supplied bundle, and no cited source establishes active exploitation. Treat exploit activity as unconfirmed.
Researcher notes
The vulnerability is CWE-121 with CVSS 3.1 score 9.8. The overwrite affects saved frame and return-address data, but reliable code execution depends on build protections and runtime conditions. The supplied evidence does not establish exploitation in the wild, a public proof of concept, or a patched release.
Mitigation direction
Identify affected OpenSIPS versions and routing scripts that invoke sip_to_json().
Disable or avoid sip_to_json() where operationally feasible until authoritative remediation is available.
Restrict SIP listeners to trusted networks and expected peers where business requirements permit.
Apply rate limiting and network filtering as temporary risk-reduction controls.
Monitor the OpenSIPS advisory and vendor guidance for an official fix or supported mitigation.
Validation and detection
Confirm the installed OpenSIPS version using trusted asset and package records.
Review routing configuration for every invocation of sip_to_json().
Determine whether SIP ports, including UDP 5060, accept traffic from untrusted networks.
Review process crashes and service restarts for suspicious SIP-related activity.
Verify stack-protection settings, while treating them only as defense in depth.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-121: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
2Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: yesTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-121 · source CWE mapping
Stack-based Buffer Overflow
Stack-based Buffer Overflow represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.