CVE-2022-24754

8.5 HIGH

📋 TL;DR

CVE-2022-24754 is a stack-buffer overflow vulnerability in PJSIP multimedia communication library that affects users accepting hashed digest credentials. Successful exploitation could allow remote code execution or denial of service. Only users with PJSIP_CRED_DATA_DIGEST credential type enabled are affected.

💻 Affected Systems

Products:
  • PJSIP (pjproject)
  • Applications using PJSIP library
Versions: All versions up to and including 2.12
Operating Systems: All platforms running PJSIP
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when using PJSIP_CRED_DATA_DIGEST credential type; plaintext credentials not affected

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, credential theft, or persistent backdoor installation

🟠

Likely Case

Denial of service causing service disruption or application crashes

🟢

If Mitigated

Limited impact with proper input validation and credential type restrictions

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires sending specially crafted digest credentials to vulnerable endpoint

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Master branch commit d27f79da11df7bc8bb56c2f291d71e54df8d2c47 and later releases

Vendor Advisory: https://github.com/pjsip/pjproject/security/advisories/GHSA-73f7-48m9-w662

Restart Required: Yes

Instructions:

1. Update to PJSIP version after 2.12 or apply commit d27f79da11df7bc8bb56c2f291d71e54df8d2c47
2. Recompile and reinstall PJSIP library
3. Restart all services using PJSIP

🔧 Temporary Workarounds

Disable Digest Credentials

all

Disable PJSIP_CRED_DATA_DIGEST credential type usage

Modify PJSIP configuration to use plaintext credentials only

Input Validation

all

Add custom validation for digest credential length before passing to PJSIP

Implement check: if (digest_length != PJSIP_MD5STRLEN) reject_credential();

🧯 If You Can't Patch

  • Disable PJSIP_CRED_DATA_DIGEST credential type entirely
  • Implement network segmentation to restrict access to PJSIP services

🔍 How to Verify

Check if Vulnerable:

Check if using PJSIP version ≤2.12 and PJSIP_CRED_DATA_DIGEST credential type is enabled

Check Version:

pkg-config --modversion pjproject || check library version in application

Verify Fix Applied:

Verify PJSIP version >2.12 or check for commit d27f79da11df7bc8bb56c2f291d71e54df8d2c47 in source

📡 Detection & Monitoring

Log Indicators:

  • Unexpected application crashes
  • Memory access violation errors
  • Failed authentication attempts with malformed credentials

Network Indicators:

  • Unusual traffic to SIP authentication endpoints
  • Multiple failed authentication attempts

SIEM Query:

source="pjsip" AND (event="crash" OR event="segfault" OR auth_failure_count > threshold)

🔗 References

📤 Share & Export