CVE-2022-24764

7.5 HIGH

📋 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

Products:
  • PJSIP (pjproject)
  • Applications using PJSUA2
  • Software embedding PJSIP library
Versions: Versions 2.12 and earlier
Operating Systems: All platforms where PJSIP is compiled and used
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if application uses PJSUA2 or directly calls pjmedia_sdp_print()/pjmedia_sdp_media_print() functions.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

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

all

The 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

📤 Share & Export