CVE-2026-45538 OpenSIPS: Stack Buffer Overflow in sip_to_json() Header Name Copy
Remote attackers can trigger a stack buffer overflow in OpenSIPS via crafted SIP headers, potentially achieving code execution or crashing the service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-45538?
CVE-2026-45538 is a critical memory corruption vulnerability in opensips, published on 4 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-121
Which versions are affected by CVE-2026-45538?
How do I fix CVE-2026-45538?
No fix has been published for CVE-2026-45538 yet. Limit exposure of the affected software until one is available.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-45538 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45538 exists.
Sources
Also known as GHSA-37wc-5j8j-95x3, UBUNTU-CVE-2026-45538.