CVE-2023-37457

7.5 HIGH

📋 TL;DR

Asterisk contains a buffer overflow vulnerability in the PJSIP_HEADER dialplan function's 'update' functionality. This can cause memory corruption or crashes, potentially leading to denial of service or arbitrary code execution. Only systems using the vulnerable 'update' functionality with untrusted input are affected.

💻 Affected Systems

Products:
  • Asterisk
  • certified-asterisk
Versions: Asterisk: 18.20.0 and prior, 20.5.0 and prior, 21.0.0; certified-asterisk: 18.9-cert5 and prior
Operating Systems: All platforms running affected Asterisk versions
Default Config Vulnerable: ✅ No
Notes: Only vulnerable if using PJSIP_HEADER function's 'update' functionality with untrusted input. Not exploitable by default.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise if dialplan processes untrusted input through the vulnerable function.

🟠

Likely Case

Denial of service through Asterisk crash, disrupting telephony services.

🟢

If Mitigated

No impact if the 'update' functionality is not used or if input validation prevents buffer overflow.

🌐 Internet-Facing: MEDIUM - Requires specific dialplan configuration using untrusted external input, not default behavior.
🏢 Internal Only: LOW - Internal systems typically have controlled inputs and less exposure.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires specific dialplan configuration that processes external data through the vulnerable function.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in commit a1ca0268254374b515fa5992f01340f7717113fa

Vendor Advisory: https://github.com/asterisk/asterisk/security/advisories/GHSA-98rc-4j27-74hh

Restart Required: Yes

Instructions:

1. Update Asterisk to patched version. 2. Apply commit a1ca0268254374b515fa5992f01340f7717113fa. 3. Restart Asterisk service.

🔧 Temporary Workarounds

Disable PJSIP_HEADER update functionality

all

Remove or modify dialplan configurations that use PJSIP_HEADER function's 'update' feature.

Review and edit Asterisk dialplan files to remove 'update' usage in PJSIP_HEADER functions

🧯 If You Can't Patch

  • Audit dialplan configurations to ensure PJSIP_HEADER 'update' functionality doesn't process untrusted input.
  • Implement network segmentation to isolate Asterisk systems from untrusted networks.

🔍 How to Verify

Check if Vulnerable:

Check Asterisk version and review dialplan for PJSIP_HEADER function usage with 'update' parameter.

Check Version:

asterisk -V

Verify Fix Applied:

Verify Asterisk version is updated beyond affected versions and confirm commit a1ca0268254374b515fa5992f01340f7717113fa is applied.

📡 Detection & Monitoring

Log Indicators:

  • Asterisk crash logs
  • Memory corruption errors in system logs

Network Indicators:

  • Unusual SIP header manipulation attempts

SIEM Query:

Search for Asterisk process crashes or memory violation errors in system logs.

🔗 References

📤 Share & Export