CVE-2023-22741: heap-over-flow in stun_parse_attribute in sofia-sip
Vulnerability summary
CVE-2023-22741 is a critical (CVSS 9.8) vulnerability in freeswitch sofia-sip. EPSS estimates a 2.48% chance of exploitation in the next 30 days, higher than 84.7% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (GitHub, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 2 · Related 1Timeline
- 19-01-2023PublishedVulnerability first disclosed.
- 10-03-2025Last modifiedVulnerability information updated.
Description
Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification. In affected versions Sofia-SIP **lacks both message length and attributes length checks** when it handles STUN packets, leading to controllable heap-over-flow. For example, in stun_parse_attribute(), after we get the attribute's type and length value, the length will be used directly to copy from the heap, regardless of the message's left size. Since network users control the overflowed length, and the data is written to heap chunks later, attackers may achieve remote code execution by heap grooming or other exploitation methods. The bug was introduced 16 years ago in sofia-sip 1.12.4 (plus some patches through 12/21/2006) to in tree libs with git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3774 d0543943-73ff-0310-b7d9-9358b9ac24b2. Users are advised to upgrade. There are no known workarounds for this vulnerability.
CVSS metrics
5 scores · 5 sources · 1 version- OSV · AlpineEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- NVDNIST9.8CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
2.48%
Chance of exploitation in the next 30 days
Percentile
85%
Versus all other CVEs
30-day change
Increase +0.10 pp
From 2.38% on 11-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundSofia Sip
Maturity: poc
Weaknesses
CWE · root cause- CWE-120Buffer Copy without Checking Size of InputThe product copies an input buffer to an output buffer without verifying that the size of the input buffer is less than the size of the output buffer.
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine1 product
- sofia-sip< 1.13.11-r0
Debian1 product
- sofia-sip< 1.12.11+20110422.1-2.1+deb10u2 | < 1.12.11+20110422.1+1e14eea~dfsg-4
Freeswitch1 product
- sofia-sip< 1.13.11
Mageia1 product
- sofia-sip< 1.12.11-10.2.mga8
Signalwire1 product
- sofia-sip< 1.13.11
Ubuntu1 product
- sofia-sip< 1.12.11+20110422.1-2.1+deb10u3ubuntu0.16.04.1~esm1 | < 1.12.11+20110422.1-2.1+deb10u3build0.18.04.1 | < 1.12.11+20110422.1-2.1+deb10u3ubuntu0.20.04.1 | < 1.12.11+20110422.1-2.1+deb10u3ubuntu0.22.04.1
6 vendors · 6 products
References
11 links- github.com/freeswitch/sofia-sip/security/advisories/GHSA-8599-x7rq-fr54X Refsource CONFIRMREPORTExploitPatchThird Party Advisory
- github.com/freeswitch/sofia-sip/commit/da53e4fbcb138b080a75576dd49c1fff2ada2764X Refsource MISCPatchThird Party Advisory