asterisk: Use After Free
CVE-2026-57187 is a high-severity use after free vulnerability in asterisk, with a CVSS 4.0 base score of 7.1 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected asterisk versions: < 20.20.1; >= 21.0.0-pre1, < 21.12.3; >= 22.0.0-pre1, < 22.10.1, and others listed below. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.48% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of asterisk you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Asterisk | asterisk | < 20.20.1; >= 21.0.0-pre1, < 21.12.3; >= 22.0.0-pre1, < 22.10.1; >= 23.0.0-pre1, < 23.4.1 | Not stated |
| Asterisk | certified-asterisk | < 20.7-cert11; >= 22.8-cert1-pre1, < 22.8-cert3 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Attack requirements
- NoneThe attack does not depend on a particular deployment or configuration.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Confidentiality (vulnerable system)
- NoneNo loss of confidentiality on the vulnerable system.
- Integrity (vulnerable system)
- NoneNo loss of integrity on the vulnerable system.
- Availability (vulnerable system)
- HighSerious loss of availability on the vulnerable system.
- Confidentiality (other systems)
- NoneNo loss of confidentiality on systems beyond the vulnerable one.
- Integrity (other systems)
- NoneNo loss of integrity on systems beyond the vulnerable one.
- Availability (other systems)
- NoneNo loss of availability on systems beyond the vulnerable one.
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X. Scored by CNA (github.com).
Official description
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-use-after-free in `PJSIP TCP/SDP` handling by sending a `SIP INVITE` over a connection-oriented transport and disconnecting before Asterisk responds with the `200 OK`. So far, the crash has only been reproduced when Asterisk is built with `Address Sanitizer`, which detects the issue. `Address Sanitizer` is a development tool with significant performance overhead and, according to the maintainer, is not used in production systems. 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/asterisk/asterisk/commit/0f076168e0be31ebee37762192d0ee049e9c0d42
- github.com/asterisk/asterisk/commit/27b9544b32f059a4f614169243eaa7559f622aa0
- github.com/asterisk/asterisk/commit/6e1f4df744369d66ea6f412e355d819b2a7bf26c
- github.com/asterisk/asterisk/commit/9e0386c6d259f0c7499d52499d9891bee8a494fa
- github.com/asterisk/asterisk/commit/b7ba85458796ef54b471017287c7806095dbda76
- github.com/asterisk/asterisk/commit/d4e30005940f86942745bcc64f34748d69870247
- github.com/asterisk/asterisk/commit/f1e47621472bb3d8ad71f32823f5ca986e008437
- github.com/asterisk/asterisk/releases/tag/20.20.1
- github.com/asterisk/asterisk/releases/tag/21.12.3
- github.com/asterisk/asterisk/releases/tag/22.10.1
- github.com/asterisk/asterisk/releases/tag/23.4.1
- github.com/asterisk/asterisk/releases/tag/certified-20.7-cert11
- github.com/asterisk/asterisk/releases/tag/certified-22.8-cert3
Other references
Other vulnerabilities in asterisk
- 8.2 High severity
- 7.0 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
- 8.1 High severity
Recent Use After Free vulnerabilities
- 7.5 High severity
- 7.7 High severity
- 7.8 High severity
- 8.8 High severity
- 7.8 High severity
- 7.1 High severity
Spotted an error? Tell us.