Every CVE Search/ Get API key

CVE-2023-22741

heap-over-flow in stun_parse_attribute in sofia-sip

9.8 CriticalFix available

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

2.48%Up 0.5 points since Jan 20, 2023
90%50%10%1%

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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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

Affected packages
PackageAffectedFixed
sofia-sip
Alpine:v3.14
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.15
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.16
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.17
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.18
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.19
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.20
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.21
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.22
before 1.13.11-r0
1.13.11-r0
sofia-sip
Alpine:v3.23
before 1.13.11-r0
1.13.11-r0
Show 11 moreShow less
Affected packages
PackageAffectedFixed
sofia-sip
Alpine:v3.24
before 1.13.11-r0
1.13.11-r0
sofia-sip
Debian:12
before 1.12.11+20110422.1+1e14eea~dfsg-4
1.12.11+20110422.1+1e14eea~dfsg-4
sofia-sip
Debian:13
before 1.12.11+20110422.1+1e14eea~dfsg-4
1.12.11+20110422.1+1e14eea~dfsg-4
sofia-sip
Debian:14
before 1.12.11+20110422.1+1e14eea~dfsg-4
1.12.11+20110422.1+1e14eea~dfsg-4
sofia-sip
Debian: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-sip
Debian: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-sip
Mageia:8
before 1.12.11-10.2.mga8
1.12.11-10.2.mga8
sofia-sip
Ubuntu: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-sip
Ubuntu: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-sip
Ubuntu: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-sip
Ubuntu: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

History
RecordedChangedSources
first indexedCVE 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

Show 11 moreShow less
MoveEnter Open