CVE-2024-3119
📋 TL;DR
A buffer overflow vulnerability in sngrep allows remote attackers to execute arbitrary code or cause denial of service through specially crafted SIP messages. This affects all versions of sngrep since v0.4.2. Anyone using sngrep to monitor or analyze SIP traffic is potentially vulnerable.
💻 Affected Systems
- sngrep
📦 What is this software?
Sngrep by Irontec
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the sngrep process, potentially leading to full system compromise.
Likely Case
Denial of service through application crash, disrupting SIP monitoring capabilities.
If Mitigated
Limited impact if sngrep runs with minimal privileges and network exposure is restricted.
🎯 Exploit Status
The vulnerability is in header parsing functions that process incoming SIP messages, requiring no authentication.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v1.8.1
Vendor Advisory: https://github.com/irontec/sngrep/releases/tag/v1.8.1
Restart Required: Yes
Instructions:
1. Download sngrep v1.8.1 from GitHub releases. 2. Stop any running sngrep processes. 3. Install the new version using your system's package manager or compile from source. 4. Restart sngrep services.
🔧 Temporary Workarounds
Network Segmentation
allRestrict sngrep to only process SIP traffic from trusted internal sources.
Process Isolation
linuxRun sngrep with minimal privileges using containerization or dedicated user accounts.
sudo useradd -r -s /bin/false sngrep-user
sudo -u sngrep-user sngrep
🧯 If You Can't Patch
- Disable sngrep entirely until patching is possible
- Implement strict network filtering to only allow SIP traffic from trusted sources to reach sngrep
🔍 How to Verify
Check if Vulnerable:
Run 'sngrep --version' and check if version is between v0.4.2 and v1.8.0 inclusive.
Check Version:
sngrep --version
Verify Fix Applied:
Confirm version is v1.8.1 or later with 'sngrep --version' and test with sample SIP traffic.
📡 Detection & Monitoring
Log Indicators:
- sngrep crash logs
- segmentation fault errors in system logs
- unexpected process termination
Network Indicators:
- Unusually long Call-ID or X-Call-ID headers in SIP traffic
- SIP messages with malformed headers targeting sngrep
SIEM Query:
process:sngrep AND (event:crash OR signal:SIGSEGV)
🔗 References
- https://github.com/irontec/sngrep/pull/480/commits/73c15c82d14c69df311e05fa75da734faafd365f
- https://github.com/irontec/sngrep/releases/tag/v1.8.1
- https://pentraze.com/vulnerability-reports/
- https://github.com/irontec/sngrep/pull/480/commits/73c15c82d14c69df311e05fa75da734faafd365f
- https://github.com/irontec/sngrep/releases/tag/v1.8.1
- https://pentraze.com/vulnerability-reports/