CVE-2023-22741
heap-over-flow in stun_parse_attribute in sofia-sip
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.8
heap-over-flow in stun_parse_attribute in sofia-sip
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.
- Record
CVE-2023-22741- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-120
- Updated
- 2026-11-02
EUVDEUVD-2023-26859
9.8
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.
- Record
EUVD-2023-26859- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
NVD
9.8
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.
- Record
CVE-2023-22741- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-120, CWE-787
- Updated
- 2026-11-02
OSVALPINE-CVE-2023-22741
9.8
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.
- Record
ALPINE-CVE-2023-22741- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV
9.8
heap-over-flow in stun_parse_attribute in sofia-sip
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.
- Record
CVE-2023-22741- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-120
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2023-22741
9.8
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.
- Record
DEBIAN-CVE-2023-22741- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2023-22741
9.8
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.
- Record
UBUNTU-CVE-2023-22741- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2023-0040 No score
Updated sofia-sip packages fix security vulnerability
Missing message length and attributes length checks** when it handles STUN packets, leading to controllable heap-over-flow (CVE-2023-22741)
- Record
MGASA-2023-0040- Updated
- 2026-11-02
OSVUSN-5932-1 No score
sofia-sip vulnerabilities
It was discovered that Sofia-SIP incorrectly handled specially crafted SDP packets. A remote attacker could use this issue to cause applications using Sofia-SIP to crash, leading to a denial of service, or possibly execute arbitrary code. This issue only affected Ubuntu 16.04 ESM, Ubuntu 18.04 LTS, Ubuntu 20.04 LTS and Ubuntu 22.04 LTS. (CVE-2022-31001, CVE-2022-31002, CVE-2022-31003)
It was discovered that Sofia-SIP incorrectly handled specially crafted UDP packets. A remote attacker could use this issue to cause applications using Sofia-SIP to crash, leading to a denial of service. (CVE-2022-47516)
Qiuhao Li discovered that Sofia-SIP incorrectly handled specially crafted STUN packets. A remote attacker could use this issue to cause applications using Sofia-SIP to crash, leading to a denial of service, or possibly execute arbitrary code. (CVE-2023-22741)
- Record
USN-5932-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
sofia-sipAlpine:v3.14 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.15 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.16 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.17 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.18 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.19 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.20 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.21 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.22 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipAlpine:v3.23 |
before 1.13.11-r0 | 1.13.11-r0 |
Show 11 moreShow less
| Package | Affected | Fixed |
|---|---|---|
sofia-sipAlpine:v3.24 |
before 1.13.11-r0 | 1.13.11-r0 |
sofia-sipDebian:12 |
before 1.12.11+20110422.1+1e14eea~dfsg-4 | 1.12.11+20110422.1+1e14eea~dfsg-4 |
sofia-sipDebian:13 |
before 1.12.11+20110422.1+1e14eea~dfsg-4 | 1.12.11+20110422.1+1e14eea~dfsg-4 |
sofia-sipDebian:14 |
before 1.12.11+20110422.1+1e14eea~dfsg-4 | 1.12.11+20110422.1+1e14eea~dfsg-4 |
sofia-sipDebian:10 |
before 1.12.11+20110422.1-2.1+deb10u2, plus listed versions 1.12.11+20110422.1-2.11.12.11+20110422.1-2.1+deb10u1 |
1.12.11+20110422.1-2.1+deb10u2 |
sofia-sipDebian:11 |
before 1.12.11+20110422.1-2.1+deb11u1, plus listed versions 1.12.11+20110422.1-2.1 |
1.12.11+20110422.1-2.1+deb11u1 |
sofia-sipMageia:8 |
before 1.12.11-10.2.mga8 | 1.12.11-10.2.mga8 |
sofia-sipUbuntu:Pro:16.04:LTS |
before 1.12.11+20110422.1-2.1+deb10u3ubuntu0.16.04.1~esm1, plus listed versions 1.12.11+20110422.1-2ubuntu1 |
1.12.11+20110422.1-2.1+deb10u3ubuntu0.16.04.1~esm1 |
sofia-sipUbuntu:18.04:LTS |
before 1.12.11+20110422.1-2.1+deb10u3build0.18.04.1, plus listed versions 1.12.11+20110422.1-2.11.12.11+20110422.1-2.1build1 |
1.12.11+20110422.1-2.1+deb10u3build0.18.04.1 |
sofia-sipUbuntu:20.04:LTS |
before 1.12.11+20110422.1-2.1+deb10u3ubuntu0.20.04.1, plus listed versions 1.12.11+20110422.1-2.1build1 |
1.12.11+20110422.1-2.1+deb10u3ubuntu0.20.04.1 |
sofia-sipUbuntu:22.04:LTS |
before 1.12.11+20110422.1-2.1+deb10u3ubuntu0.22.04.1, plus listed versions 1.12.11+20110422.1-2.1ubuntu11.12.11+20110422.1-2.1ubuntu2 |
1.12.11+20110422.1-2.1+deb10u3ubuntu0.22.04.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-22741 is a critical vulnerability (CVSS 9.8) in Freeswitch Sofia-sip, published January 19, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.48%, the 84th percentile. Fixed in sofia-sip 1.13.11-r0.
References
github.com/freeswitch/sofia-sip/security/advisories/GHSA-8599-x7rq-fr54
github.com/freeswitch/sofia-sip/commit/da53e4fbcb138b080a75576dd49c1fff2ada2764
debian.org/security/2023/dsa-5410
security.alpinelinux.org/vuln/CVE-2023-22741
github.com/CVEProject/cvelistV5/tree/main/cves/2023/22xxx/CVE-2023-22741.json
nvd.nist.gov/vuln/detail/CVE-2023-22741
Show 11 moreShow less
security-tracker.debian.org/tracker/CVE-2023-22741
advisories.mageia.org/MGASA-2023-0040.html
bugs.mageia.org/show_bug.cgi?id=31493
debian.org/lts/security/2023/dla-3292
ubuntu.com/security/CVE-2023-22741
ubuntu.com/security/notices/USN-5932-1
cve.org/CVERecord?id=CVE-2023-22741
ubuntu.com/security/CVE-2022-31001
ubuntu.com/security/CVE-2022-31002
ubuntu.com/security/CVE-2022-31003
ubuntu.com/security/CVE-2022-47516