Heap-Based Buffer Overflow in Kamailio - CVE-2016-2385

kamailio Updated 02 Oct 2025

Summary

11/04/2016
N/A
Yes i
Critical
9.8

CVE-2016-2385: 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 pro... Affects kamailio across 2 version ranges.

< 4.3.4-2 < f50c9c853e7809810099c970780c30b0765b0643

Fixed in 4.3.4-2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Kamailio is an open-source SIP server that enables the handling of VoIP (Voice over Internet Protocol) communications. It is widely used for its scalability and flexibility in managing SIP signaling. The SEAS module within Kamailio is responsible for encoding messages, but it has a critical vulnerability that can be exploited by attackers to disrupt service or execute arbitrary code.

Vulnerability Detail

The vulnerability identified as CVE-2016-2385 is a heap-based buffer overflow in the encode_msg function located in encode_msg.c of the SEAS module in Kamailio versions prior to 4.3.5. This flaw allows remote attackers to send large SIP packets that can lead to memory corruption, causing the Kamailio process to crash or potentially allowing the execution of arbitrary code. The severity of this vulnerability is underscored by its CVSS score of 9.8, indicating a critical risk to systems running affected versions.

How To Fix

Minimum fixed version

4.3.4-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade kamailio

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing network-level protections such as firewalls to filter out potentially malicious SIP packets. Additionally, you can limit the size of SIP packets accepted by your server to mitigate the risk until a proper upgrade can be performed.

Conclusion

CVE-2016-2385 represents a significant security risk for users of Kamailio prior to version 4.3.5. It is crucial to upgrade to the latest version to protect against potential exploits that could lead to service disruption or unauthorized access. Regular monitoring and prompt updates are essential for maintaining the security of your systems.

See every vulnerability recorded for kamailio →

Share this vulnerability

FAQ

CVE-2016-2385 is a vulnerability in the Kamailio SIP server that allows remote attackers to exploit a buffer overflow, potentially leading to service disruption or arbitrary code execution.

You can check your Kamailio version by running 'kamailio -v' in your terminal. If it is below 4.3.5, it is vulnerable.

Failure to address this vulnerability can result in denial of service attacks, memory corruption, and unauthorized code execution, compromising the security and stability of your SIP communications.

Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json. You can check for vulnerabilities without signup at the Vulert playground.

The CVSS score for CVE-2016-2385 is 9.8, indicating a critical level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for kamailio.

How To Fix

Minimum fixed version

4.3.4-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade kamailio

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback