{"id":"CVE-2022-31031","summary":"Potential stack buffer overflow when parsing message as a STUN client","details":"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.","aliases":["GHSA-26j7-ww69-c4qj"],"modified":"2026-04-12T02:56:46.380018Z","published":"2022-06-07T00:00:00Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31031.json","cwe_ids":["CWE-120"],"cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00030.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31031.json"},{"type":"ADVISORY","url":"https://github.com/pjsip/pjproject/security/advisories/GHSA-26j7-ww69-c4qj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31031"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202210-37"},{"type":"ADVISORY","url":"https://www.debian.org/security/2023/dsa-5358"},{"type":"FIX","url":"https://github.com/pjsip/pjproject/commit/450baca94f475345542c6953832650c390889202"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2023/02/msg00029.html"},{"type":"ARTICLE","url":"https://lists.debian.org/debian-lts-announce/2023/08/msg00038.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/pjsip/pjproject","events":[{"introduced":"0"},{"fixed":"450baca94f475345542c6953832650c390889202"}]}],"versions":["2.10","2.11","2.12"],"database_specific":{"vanir_signatures_modified":"2026-04-12T02:56:46Z","vanir_signatures":[{"deprecated":false,"target":{"file":"pjlib-util/src/pjlib-util/stun_simple.c"},"digest":{"threshold":0.9,"line_hashes":["18675985838574001591672348400044795040","200545929341133339176492842925854951894","71345757283245926026788890123809048397","211798829883131747519432289994270918858","256546572321531786175823060796245495320","176674116864836577417796026252013864768","35219471761988995358705221229101182948","100676641146409153927902959964396058321","64010385457529374259348921871547858181","171761158291525197135947210639399377618","132419225607288865818083473479881875173","205008093233970311751219738864899309652"]},"signature_type":"Line","signature_version":"v1","source":"https://github.com/pjsip/pjproject/commit/450baca94f475345542c6953832650c390889202","id":"CVE-2022-31031-b211dd0b"},{"deprecated":false,"target":{"file":"pjlib-util/src/pjlib-util/stun_simple.c","function":"pjstun_parse_msg"},"digest":{"function_hash":"105640829199272616322361861027215462711","length":1569},"signature_type":"Function","signature_version":"v1","source":"https://github.com/pjsip/pjproject/commit/450baca94f475345542c6953832650c390889202","id":"CVE-2022-31031-d5d5e7ab"}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-31031.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}