Description
Heap-based buffer overflow in the encode_msg function in encode_msg.c in the SEAS module in Kamailio (formerly OpenSER and SER) before 4.3.5 allows remote attackers to cause a denial of service (memory corruption and process crash) or possibly execute arbitrary code via a large SIP packet.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | kamailio | 4.3.4-2 | — |
| Debian 13 | kamailio | 4.3.4-2 | — |
| Debian 12 | kamailio | 4.3.4-2 | — |
| Debian 8 | kamailio | 4.2.0-2+deb8u1 | DSA-3535-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 20.04 LTS | kamailio | 5.3.2-1ubuntu0.1~esm2 | USN-7416-1 |
| Ubuntu Pro 18.04 LTS | kamailio | 5.1.2-1ubuntu2+esm2 | USN-7416-1 |
| Ubuntu Pro 16.04 LTS | kamailio | 4.3.4-1.1ubuntu2.1+esm2 | USN-7416-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Kamailio 4.3.4 - Heap Buffer Overflow EDB-39638 · dos · Mar 30, 2016
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- USN-7416-1 kamailio vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- DSA-3535-1 kamailio - security update Debian Security (DSA / DLA) · Mar 9, 2026
References
- http://packetstormsecurity.com/files/136477/Kamailio-4.3.4-Heap-Overflow.html
- https://github.com/kamailio/kamailio/commit/f50c9c853e7809810099c970780c30b0765b0643
- https://census-labs.com/news/2016/03/30/kamailio-seas-heap-overflow/
- DSA-3535 vendor-advisory
- 39638 exploit
- DSA-3537 vendor-advisory
- 20160330 CVE-2016-2385 Kamailio SEAS module heap buffer overflow mailing-list
- http://www.kamailio.org/pub/kamailio/4.3.5/ChangeLog