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 siptojson() is called in the routing script. Function siptojson() (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 siptojson(), 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 siptojson(). This issue was not fixed at the time of publication.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-45538?
The severity of CVE-2026-45538 is critical with a CVSS score of 9.8.
How do I fix CVE-2026-45538?
To fix CVE-2026-45538, upgrade OpenSIPS to version 4.0.1 or later.
What type of vulnerability is CVE-2026-45538?
CVE-2026-45538 is a stack buffer overflow vulnerability.
Which software versions are affected by CVE-2026-45538?
OpenSIPS versions 4.0.0 and prior are affected by CVE-2026-45538.
What can be exploited in CVE-2026-45538?
CVE-2026-45538 can be exploited through processing SIP messages with excessively long header names.