# CVE-2022-31031: Potential stack buffer overflow when parsing message as a STUN client

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.07%, higher than 81% of CVEs (2026-12-01)
- Published: 2022-06-07T00:00:00.000Z
- Modified: 2026-06-17T04:44:38.713Z
- Weaknesses: CWE-120, CWE-787
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. In versions prior to and including 2.12.1 a stack buffer overflow vulnerability affects PJSIP users that use STUN in their applications, either by: setting a STUN server in their account/media config in PJSUA/PJSUA2 level, or directly using `pjlib-util/stun_simple` API. A patch is available in commit 450baca which should be included in the next release. There are no known workarounds for this issue.

(As written by CVE List.)

## Affected

- pjsip pjproject: <= 2.12.1
- teluu pjsip: up to 2.12.1
- debian debian_linux: 10.0; 11.0

## Every score

- GitHub_M: 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`
- NVD: 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`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/pjsip/pjproject/security/advisories/GHSA-26j7-ww69-c4qj> (patch, third-party-advisory)
- <https://github.com/pjsip/pjproject/commit/450baca94f475345542c6953832650c390889202> (patch, third-party-advisory)
- <https://security.gentoo.org/glsa/202210-37> (third-party-advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2023/02/msg00029.html> (mailing-list)
- <https://www.debian.org/security/2023/dsa-5358> (third-party-advisory, vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2023/08/msg00038.html> (mailing-list)
- <https://lists.debian.org/debian-lts-announce/2024/09/msg00030.html>

## Sources

- CVE List: [CVE-2022-31031](https://www.cve.org/CVERecord?id=CVE-2022-31031), CVE Terms of Use, modified 2025-11-04
- NVD: [CVE-2022-31031](https://nvd.nist.gov/vuln/detail/CVE-2022-31031), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-31031 · Whole record: https://cve.day/CVE-2022-31031.json · Rebuilt by cve.day 2026-11-25T22:58:12.192Z
