CVE-2023-22741

Public Exploit
heap-over-flow in stun_parse_attribute in sofia-sip

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.

Categories

9.8
CVSS
Severity: Critical
CVSS 3.1 •
EPSS 2.51% Top 20%
Third-Party Advisory github.com Third-Party Advisory github.com
Affected: freeswitch sofia-sip
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-22741?
CVE-2023-22741 has been scored as a critical severity vulnerability.
How to fix CVE-2023-22741?
To fix CVE-2023-22741, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2023-22741 being actively exploited in the wild?
It is possible that CVE-2023-22741 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~3% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-22741?
CVE-2023-22741 affects freeswitch sofia-sip.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.