CVE-2026-57192: Asterisk: Out-of-Bounds Write in Codec2 Decoder Due to Floor/Ceil Sample Count Mismatch
Asterisk is an open source private branch exchange and telephony toolkit. Prior to Asterisk 20.20.1, 21.12.3, 22.10.1, 23.4.1 and Certified Asterisk 20.7-cert11, 22.8-cert3, an authenticated attacker may cause a heap buffer overflow through an out-of-bounds write in the Codec2 decoder caused by a floor/ceil sample-count mismatch. The codeccodec2 module must be loaded and Codec2 must be configured on the attacked endpoint. The attacker must pass SIP authentication by username/password or source IP address matching, establish a call using Codec2, and send carefully crafted Codec2 audio packets. This issue is fixed in Asterisk 20.20.1, 21.12.3, 22.10.1, 23.4.1 and Certified Asterisk 20.7-cert11, 22.8-cert3.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/asteriskto a version that resolves this vulnerability.Fixed in 1:22.10.1+dfsg+~cs6.17.60671434-1 - Upgrade
Upgrade
Asteriskto a version that resolves this vulnerability.Fixed in 20.20.1 - Upgrade
Upgrade
Asteriskto a version that resolves this vulnerability.Fixed in 21.12.3 - Upgrade
Upgrade
Asteriskto a version that resolves this vulnerability.Fixed in 22.10.1 - Upgrade
Upgrade
Asteriskto a version that resolves this vulnerability.Fixed in 23.4.1 - Upgrade
Upgrade
Certified Asteriskto a version that resolves this vulnerability.Fixed in 20.7-cert11 - Upgrade
Upgrade
Certified Asteriskto a version that resolves this vulnerability.Fixed in 22.8-cert3
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
A deployment is exposed only if the codec_codec2 module is loaded and Codec2 is configured on the endpoint an attacker can call. Systems that do not use Codec2 on reachable endpoints are not affected through this attack path.
What access does an attacker need to exploit it?
The attacker must authenticate to SIP, either with a username and password or by matching an allowed source IP address. They must then establish a Codec2 call and send carefully crafted Codec2 audio packets.
Are default Asterisk configurations affected?
The issue requires both the codec_codec2 module to be loaded and Codec2 to be configured for the targeted endpoint. The provided information does not establish whether those conditions are present in a default configuration.
What can be done before an upgrade is possible?
Disable or unload the codec_codec2 module, or remove Codec2 from endpoints that could be reached by untrusted authenticated callers. Restrict SIP authentication so untrusted users and source IP addresses cannot establish calls using Codec2.
Which releases contain the fix?
Fixed releases are Asterisk 20.20.1, 21.12.3, 22.10.1, and 23.4.1, plus Certified Asterisk 20.7-cert11 and 22.8-cert3.