CVE-2022-24764
📋 TL;DR
CVE-2022-24764 is a stack buffer overflow vulnerability in PJSIP multimedia communication library affecting versions 2.12 and prior. It allows attackers to execute arbitrary code or cause denial of service by exploiting the pjmedia_sdp_print() and pjmedia_sdp_media_print() functions. Only applications using PJSUA2 or directly calling these vulnerable functions are affected.
💻 Affected Systems
- PJSIP (pjproject)
- Applications using PJSUA2
- Software embedding PJSIP library
📦 What is this software?
Pjsip by Teluu
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or persistent backdoor installation.
Likely Case
Denial of service causing application crashes or service disruption in affected PJSIP implementations.
If Mitigated
Limited impact with proper network segmentation, minimal privileges, and exploit mitigations like ASLR/stack canaries.
🎯 Exploit Status
Exploitation requires triggering the vulnerable functions with crafted SDP data. No public exploits known as of advisory.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Master branch commit 560a1346f87aabe126509bb24930106dea292b00 and later
Vendor Advisory: https://github.com/pjsip/pjproject/security/advisories/GHSA-f5qg-pqcg-765m
Restart Required: Yes
Instructions:
1. Update to patched version from GitHub master branch. 2. Recompile PJSIP library. 3. Recompile and redeploy affected applications. 4. Restart services using PJSIP.
🔧 Temporary Workarounds
No known workarounds
allThe vendor advisory states there are no known workarounds for this vulnerability.
🧯 If You Can't Patch
- Disable or restrict access to applications using PJSUA2 or vulnerable functions
- Implement network segmentation and firewall rules to limit exposure of affected services
🔍 How to Verify
Check if Vulnerable:
Check PJSIP version with pjsua2 --version or examine library headers for version <= 2.12. Review application code for calls to pjmedia_sdp_print() or pjmedia_sdp_media_print().
Check Version:
pjsua2 --version 2>/dev/null || grep "PJ_VERSION_NUM" /usr/include/pj/config.h 2>/dev/null
Verify Fix Applied:
Verify PJSIP version is >2.12 or includes commit 560a1346f87aabe126509bb24930106dea292b00. Test application functionality after patch.
📡 Detection & Monitoring
Log Indicators:
- Application crashes with segmentation faults
- Stack overflow errors in PJSIP logs
- Abnormal termination of PJSIP services
Network Indicators:
- Unusual SDP payloads in SIP traffic
- Malformed multimedia session negotiation attempts
SIEM Query:
source="*pjsip*" AND (event="segmentation fault" OR event="stack overflow" OR event="crash")
🔗 References
- https://github.com/pjsip/pjproject/commit/560a1346f87aabe126509bb24930106dea292b00
- https://github.com/pjsip/pjproject/security/advisories/GHSA-f5qg-pqcg-765m
- https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html
- https://lists.debian.org/debian-lts-announce/2022/11/msg00021.html
- https://lists.debian.org/debian-lts-announce/2023/08/msg00038.html
- https://security.gentoo.org/glsa/202210-37
- https://www.debian.org/security/2022/dsa-5285
- https://github.com/pjsip/pjproject/commit/560a1346f87aabe126509bb24930106dea292b00
- https://github.com/pjsip/pjproject/security/advisories/GHSA-f5qg-pqcg-765m
- https://lists.debian.org/debian-lts-announce/2022/03/msg00035.html
- https://lists.debian.org/debian-lts-announce/2022/11/msg00021.html
- https://lists.debian.org/debian-lts-announce/2023/08/msg00038.html
- https://lists.debian.org/debian-lts-announce/2024/09/msg00030.html
- https://security.gentoo.org/glsa/202210-37
- https://www.debian.org/security/2022/dsa-5285