CVE-2024-42365
Asterisk allows `Write=originate` as sufficient permissions for code execution / `System()` dialplan
Mitigation
- Upgrade asterisk to 20.7-cert2 or later.
Who should check
- Anyone running asterisk < 18.24.2; >= 19.0.0, < 20.9.2; >= 21.0.0, < 21.4.2; < 18.9-cert11; >= 19.0, < 20.7-cert2
Vulnerability facts
- Affected
- asterisk < 18.24.2; >= 19.0.0, < 20.9.2; >= 21.0.0, < 21.4.2; < 18.9-cert11; >= 19.0, < 20.7-cert2
- Fixed in
- asterisk 18.24.2, asterisk 20.9.2, asterisk 21.4.2, asterisk 18.9-cert11, asterisk 20.7-cert2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 7.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: Low
- EPSS
- 7.54% chance of exploitation in 30 days (percentile 95, 2026-11-26)
- CWE
- CWE-267, CWE-1220
- Modified
Description
Asterisk is an open source private branch exchange (PBX) and telephony toolkit. Prior to asterisk versions 18.24.2, 20.9.2, and 21.4.2 and certified-asterisk versions 18.9-cert11 and 20.7-cert2, an AMI user with `write=originate` may change all configuration files in the `/etc/asterisk/` directory. This occurs because they are able to curl remote files and write them to disk, but are also able to append to existing files using the `FILE` function inside the `SET` application. This issue may result in privilege escalation, remote code execution and/or blind server-side request forgery with arbitrary protocol. Asterisk versions 18.24.2, 20.9.2, and 21.4.2 and certified-asterisk versions 18.9-cert11 and 20.7-cert2 contain a fix for this issue.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| asterisk | < 18.24.2; >= 19.0.0, < 20.9.2; >= 21.0.0, < 21.4.2; < 18.9-cert11; >= 19.0, < 20.7-cert2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-42365. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-42365.md Affected: asterisk < 18.24.2; >= 19.0.0, < 20.9.2; >= 21.0.0, < 21.4.2; < 18.9-cert11; >= 19.0, < 20.7-cert2 Fixed in: asterisk 18.24.2, asterisk 20.9.2, asterisk 21.4.2, asterisk 18.9-cert11, asterisk 20.7-cert2 Steps: 1. Search this machine and project for asterisk: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://github.com/asterisk/asterisk/commit/42a2f4ccfa2c7062a15063e765916b3332e34cc4
- https://github.com/asterisk/asterisk/commit/7a0090325bfa9d778a39ae5f7d0a98109e4651c8
- https://github.com/asterisk/asterisk/commit/b4063bf756272254b160b6d1bd6e9a3f8e16cc71
- https://github.com/asterisk/asterisk/commit/bbe68db10ab8a80c29db383e4dfe14f6eafaf993
- https://github.com/asterisk/asterisk/commit/faddd99f2b9408b524e5eb8a01589fe1fa282df2
FAQ
Is CVE-2024-42365 being exploited?
There is no confirmed exploitation: CVE-2024-42365 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 7.54% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-42365?
High: CVSS 7.4 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2024-42365?
asterisk < 18.24.2; >= 19.0.0, < 20.9.2; >= 21.0.0, < 21.4.2; < 18.9-cert11; >= 19.0, < 20.7-cert2.
Is there a fix for CVE-2024-42365?
Yes. Fixed in asterisk 18.24.2, asterisk 20.9.2, asterisk 21.4.2, asterisk 18.9-cert11, asterisk 20.7-cert2. Upgrade asterisk to 20.7-cert2 or later.
How do I check if I'm affected by CVE-2024-42365?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.