CVE-2024-3119
Critical · 9.0CVSS
9.0
EPSS
1.8%
Published
Apr 10, 2024
CISA due date
—
Cloudanix analysis
A network call analysis tool can be taken over or shut down by specially crafted messages sent across the network, risking service outages and unauthorized access.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Application
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Buffer overflow in sip_get_callid and sip_get_xcallid functions allows remote attackers to overwrite memory via oversized Call-ID or X-Call-ID SIP headers copied with strncpy into fixed buffers without length validation, enabling arbitrary code execution or denial of service.
Why it matters to the business
Attackers can remotely crash or fully compromise systems running sngrep, disrupting SIP traffic analysis operations and potentially allowing persistent unauthorized access across networks that rely on this tool for VoIP diagnostics.
How an attack unfolds
An attacker sends a specially crafted SIP INVITE or other message containing an excessively long Call-ID or X-Call-ID header value to a network-visible sngrep instance; the vulnerable strncpy calls in sip.c overflow the stack or heap buffer, hijacking control flow to execute attacker-supplied code or crash the process.
How to fix it
Upgrade irontec/sngrep to the commit 373abb90804ba71f980c7120e62f90d3a5c81213 or later release; rebuild from source if using GIT checkout and verify the fix is present in sip.c before redeploying.
How to confirm the fix worked
Confirm the running binary or source matches the fixed commit hash, recompile with the patch, and test header parsing with boundary-case SIP messages containing maximum-length and oversized Call-ID values to ensure no overflow occurs.
Typical attack path
- Scan for exposed sngrep instances or SIP endpoints that feed traffic into the tool
- Craft a malicious SIP message embedding an oversized Call-ID or X-Call-ID header
- Transmit the message over UDP/TCP to trigger header parsing in sip.c
- Achieve memory corruption leading to code execution or denial of service
How to detect it
Review sngrep process logs and system crash dumps for segmentation faults during SIP header parsing, inspect incoming SIP traffic for abnormally long Call-ID or X-Call-ID values, and correlate with network captures showing repeated malformed INVITE messages.
- sngrep segmentation fault
- Call-ID header exceeding 256 bytes
- X-Call-ID header exceeding 256 bytes
- sip_get_callid
- sip_get_xcallid
What your security team should do
- Immediately update all sngrep deployments to the fixed commit
- Restrict sngrep exposure to trusted SIP traffic sources only
- Monitor for unusual process crashes or high CPU in sngrep instances
- Add network segmentation for VoIP analysis hosts
The record
A buffer overflow vulnerability exists in all versions of sngrep since v0.4.2, due to improper handling of 'Call-ID' and 'X-Call-ID' SIP headers. The functions sip_get_callid and sip_get_xcallid in sip.c use the strncpy function to copy header contents into fixed-size buffers without checking the data length. This flaw allows remote attackers to execute arbitrary code or cause a denial of service (DoS) through specially crafted SIP messages.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | sngrep | 0 | No fix |
| Debian:12 | sngrep | 0 | No fix |
| Debian:13 | sngrep | 0 | 1.8.1-1 |
| Debian:14 | sngrep | 0 | 1.8.1-1 |
| SUSE:Package Hub 15 SP5 | sngrep | 0 | 1.8.1-bp155.2.3.1 |
| Ubuntu:16.04:LTS | sngrep | 0 | No fix |
| Ubuntu:18.04:LTS | sngrep | 0 | No fix |
| Ubuntu:20.04:LTS | sngrep | 0 | No fix |
| Ubuntu:22.04:LTS | sngrep | 0 | No fix |
| Ubuntu:24.04:LTS | sngrep | 0 | No fix |
| Ubuntu:24.10 | sngrep | 0 | No fix |
| Ubuntu:25.04 | sngrep | 0 | No fix |
| Ubuntu:25.10 | sngrep | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | sngrep | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | sngrep | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | sngrep | 0 | No fix |
| openSUSE:Leap 15.5 | sngrep | 0 | 1.8.1-bp155.2.3.1 |
| openSUSE:Tumbleweed | sngrep | 0 | 1.8.1-1.1 |
Related vulnerabilities
- CVE-2024-3120 A stack-buffer overflow vulnerability exists in all versions of sngrep since v1.4.1. Also affects sngrep
- CVE-2026-112108 A vulnerability was determined in ztxz16 fastllm up to 0.1.8.2. CWE-120
- CVE-2026-90804 A vulnerability was detected in GNU Binutils 2.47. CWE-120
- CVE-2026-90803 A security vulnerability has been detected in GNU Binutils 2.47. CWE-120
- CVE-2026-90801 A security flaw has been discovered in GNU Binutils 2.47. CWE-120
- CVE-2026-42808 An issue was discovered in Bosch Sensortec COINES_SDK versions 2.0 through 2.11. The host… CWE-120
- CVE-2026-87931 A vulnerability has been found in Behavioral Technology Group Pavlok Behavioral… CWE-120
- CVE-2026-71613 Buffer Overflow vulnerability in GPAC c2dee3aff638cd96f9617ac5b17dc2868cd90ef3 allows an… CWE-120