CVE-2021-43845

8.2 HIGH

📋 TL;DR

CVE-2021-43845 is an out-of-bounds read vulnerability in PJSIP multimedia communication library versions 2.11.1 and earlier. A malicious actor can send specially crafted RTCP XR messages with invalid packet sizes, potentially causing memory corruption or information disclosure. This affects all users of PJMEDIA with RTCP XR functionality enabled.

💻 Affected Systems

Products:
  • PJSIP (pjproject)
  • Any software using PJSIP library
Versions: 2.11.1 and earlier
Operating Systems: All platforms running PJSIP
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with PJMEDIA and RTCP XR functionality enabled. Many VoIP and multimedia applications use PJSIP.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, though out-of-bounds read typically results in information disclosure or denial of service.

🟠

Likely Case

Application crash leading to denial of service, or information disclosure from memory contents.

🟢

If Mitigated

Minimal impact if proper network segmentation and input validation are in place.

🌐 Internet-Facing: HIGH - RTCP XR messages can be sent remotely without authentication to internet-facing services using PJSIP.
🏢 Internal Only: MEDIUM - Internal attackers could exploit this, but requires network access to vulnerable services.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW - Sending malformed RTCP XR packets requires minimal technical skill.

The vulnerability is in the parsing logic, making exploitation straightforward for attackers with network access.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.12 and later

Vendor Advisory: https://github.com/pjsip/pjproject/security/advisories/GHSA-r374-qrwv-86hh

Restart Required: Yes

Instructions:

1. Update PJSIP to version 2.12 or later. 2. Recompile any applications using PJSIP. 3. Restart affected services.

🔧 Temporary Workarounds

Disable RTCP XR

all

Disable RTCP XR functionality if not required.

Configure PJSIP to disable RTCP XR in application settings

Network filtering

linux

Block or filter RTCP XR packets at network perimeter.

iptables -A INPUT -p udp --dport [rtcp-port] -m string --hex-string '|52544350|' --algo bm -j DROP

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate vulnerable systems
  • Deploy intrusion detection systems to monitor for malformed RTCP packets

🔍 How to Verify

Check if Vulnerable:

Check PJSIP version and verify RTCP XR is enabled in configuration.

Check Version:

pjsua --version or check library version in application

Verify Fix Applied:

Verify PJSIP version is 2.12 or later and test with valid RTCP XR packets.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes
  • Memory access violation errors
  • Unexpected RTCP packet processing errors

Network Indicators:

  • Malformed RTCP XR packets
  • Unusual RTCP traffic patterns

SIEM Query:

source="*pjsip*" AND (error OR crash OR "out of bounds" OR "memory violation")

🔗 References

📤 Share & Export