Impact
OpenSIPS versions 4.0.0 and prior contain a stack buffer overflow in the sip_to_json() function. When the function copies a SIP header name longer than 255 bytes into a fixed 255‑byte buffer without bounds checking, an attacker can craft a SIP message whose header name exceeds the limit. The overflow corrupts the saved frame pointer and return address, allowing the attacker to crash the process or, on builds without stack protections, hijack execution to achieve remote code execution.
Affected Systems
All deployments of OpenSIPS:opensips running version 4.0.0 or earlier that use the sip_to_json() function within their routing scripts are affected. The vulnerability is triggered by any routing script that calls this function with untrusted SIP header names.
Risk and Exploitability
The vulnerability receives a CVSS score of 9.8, indicating critical severity. EPSS is not available and the issue is not listed in CISA’s KEV catalog. A single unauthenticated UDP packet sent to the SIP port (5060) can trigger the overflow, meaning the attack vector is readily exploitable and requires no special privileges. On systems without stack protection such as stack canaries, this overflow can lead to arbitrary code execution, making the risk extremely high.
OpenCVE Enrichment