Skip to content
Fencer Vulns
critical 9.8

CVE-2023-22741 json

heap-over-flow in stun_parse_attribute in sofia-sip

published 2023-01-19 3 y ago modified 2026-06-17 4 mo ago also EUVD-2023-26859

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
2.5%
EPSS 2.5% chance of exploitation in 30 days, percentile 84%
public exploits
0
none known

Summary

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.

Patch / fix

  • signalwire sofia-sip 1.13.11
  • sofia-sip Debian 14, Debian 13, Debian 12 1.12.11+20110422.1+1e14eea~dfsg-4

debian advisories DEBIAN-CVE-2023-22741

  • sofia-sip Ubuntu 18.04 LTS 1.12.11+20110422.1-2.1+deb10u3build0.18.04.1
  • sofia-sip Ubuntu 20.04 LTS 1.12.11+20110422.1-2.1+deb10u3ubuntu0.20.04.1
  • sofia-sip Ubuntu 22.04 LTS 1.12.11+20110422.1-2.1+deb10u3ubuntu0.22.04.1
  • sofia-sip Ubuntu Pro 16.04 LTS 1.12.11+20110422.1-2.1+deb10u3ubuntu0.16.04.1~esm1

ubuntu advisories UBUNTU-CVE-2023-22741

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • sofia-sip Alpine 3.24, Alpine 3.23, Alpine 3.22 +8 more 1.13.11-r0

alpine advisories ALPINE-CVE-2023-22741

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2023-22741 updated cvss 9.8

sofia-sip: heap-over-flow in stun_parse_attribute

  • Red Hat All currently supported Red Hat products
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
yes
Technical impact
total
Assessed
19 mo ago

Exploit prediction

2.48% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/freeswitch/sofia-sip/security/advisories/GHSA-8599-x7rq-fr54 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

  • freeswitch sofia-sip

Classification

Weakness
  • CWE-120 Buffer Copy without Checking Size of Input
  • CWE-787 Out-of-bounds Write

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.