CVE-2024-42365: Asterisk allows `Write=originate` as sufficient permissions for code execution / `System()` dialplan

CVE-2024-42365 affects 170 listed versions of Sangoma Asterisk in the Dawnsentry catalogue.

8.8CVSS high
Attack tool publicexploitation
5%EPSS (next 30 days)
8 August 2024published

Affected products and versions

The versions in the Dawnsentry catalogue this CVE affects, judged from the vendor's own advisory where there is one, otherwise from the CVE record and NVD, as each version's own page says.

Sangoma Asterisk

170 of 250 listed versions are affected. Fixed in 21.4.2, 20.9.2, 18.24.2. The newest release, 24.0.0, is not affected.

21.4.1 21.4.0 21.3.1 21.3.0 21.2.0 21.1.0 21.0.2 21.0.1 21.0.0 20.9.1 20.9.0 20.8.1 20.8.0 20.7.0 20.7-cert9 20.7-cert7 20.7-cert5 20.7-cert2 20.6.0 20.5.2 20.5.1 20.5.0 20.4.0 20.3.1 20.3.0 20.2.1 20.2.0 20.1.0 20.0.1 20.0.0 19.8.1 19.8.0 19.7.1 19.7.0 19.6.0 19.5.0 19.4.1 19.4.0 19.3.3 19.3.2 19.3.1 19.3.0 19.2.1 19.2.0 19.1.0 19.0.0 18.24.1 18.24.0 18.23.1 18.23.0 18.22.0 18.21.0 18.20.2 18.20.1 18.20.0 18.19.0 18.18.1 18.18.0 18.17.1 18.17.0 and 110 more

What it is

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.

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD)

Published by GitHub on 8 August 2024. Last changed 17 June 2026. Exploit code is public (Metasploit or Nuclei).

Sources

Check one version you run: look CVE-2024-42365 up, or pick a product and version in the quick lookup.

Updated 2 December 2026.