CVE-2021-32558

7.5 HIGH

📋 TL;DR

This vulnerability in Asterisk IAX2 channel driver allows remote attackers to crash the service by sending packets with unsupported media formats. It affects Asterisk 13.x, 16.x, 17.x, 18.x, and Certified Asterisk installations. The crash leads to denial of service, disrupting telephony services.

💻 Affected Systems

Products:
  • Sangoma Asterisk
  • Certified Asterisk
Versions: Asterisk 13.x before 13.38.3, 16.x before 16.19.1, 17.x before 17.9.4, 18.x before 18.5.1, Certified Asterisk before 16.8-cert10
Operating Systems: All platforms running affected Asterisk versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems with IAX2 enabled and exposed to network traffic. IAX2 is commonly used for VoIP trunking and device connections.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service outage of Asterisk telephony services, disrupting all voice communications and potentially affecting business operations.

🟠

Likely Case

Service crashes requiring manual restart, causing temporary telephony service disruption until recovery.

🟢

If Mitigated

No impact if patched or workarounds implemented; service continues normal operation.

🌐 Internet-Facing: HIGH - Asterisk servers exposed to internet can be crashed by any remote attacker sending crafted IAX2 packets.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could crash Asterisk services, but requires network access to Asterisk IAX2 port.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit requires sending specially crafted IAX2 packets to vulnerable Asterisk server on IAX2 port (default 4569). No authentication needed.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Asterisk 13.38.3, 16.19.1, 17.9.4, 18.5.1, Certified Asterisk 16.8-cert10

Vendor Advisory: https://downloads.asterisk.org/pub/security/AST-2021-008.html

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Download patched version from official Asterisk repository. 3. Stop Asterisk service. 4. Install updated version. 5. Restart Asterisk service. 6. Verify service is running and check version.

🔧 Temporary Workarounds

Disable IAX2 if not needed

linux

Remove or disable IAX2 protocol if not required for your deployment

Comment out IAX2 configuration in /etc/asterisk/iax.conf
Remove IAX2 module loading in /etc/asterisk/modules.conf

Network filtering

linux

Restrict access to IAX2 port (4569) to trusted sources only

iptables -A INPUT -p udp --dport 4569 -s trusted_ip -j ACCEPT
iptables -A INPUT -p udp --dport 4569 -j DROP

🧯 If You Can't Patch

  • Implement strict network access controls to limit IAX2 port exposure
  • Deploy intrusion detection/prevention systems to detect and block malicious IAX2 packets

🔍 How to Verify

Check if Vulnerable:

Check Asterisk version: asterisk -rx 'core show version' and compare against affected versions. Also verify IAX2 is enabled in configuration.

Check Version:

asterisk -rx 'core show version' | grep 'Asterisk'

Verify Fix Applied:

After patching, run: asterisk -rx 'core show version' to confirm updated version. Test IAX2 functionality remains operational.

📡 Detection & Monitoring

Log Indicators:

  • Asterisk crash/restart logs
  • IAX2 protocol errors in /var/log/asterisk/full
  • Segmentation fault messages

Network Indicators:

  • Unusual IAX2 traffic patterns
  • Multiple connection attempts to port 4569
  • Malformed IAX2 packets

SIEM Query:

source="asterisk.log" AND ("segmentation fault" OR "crash" OR "IAX2 error")

🔗 References

📤 Share & Export