Vulnerability · Published Aug 8, 2024 · Assigned by GitHub_M

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

High 7.4

In plain English

A high-severity security flaw in asterisk from asterisk. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 4.7% (higher than 92% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.4High
Exploit odds (30 days)4.7%top 8.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling2Metasploit, Public PoC

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20asterisk20.9.2-r0ALPINE-CVE-2024-42365
Alpine:v3.21asterisk20.9.2-r0ALPINE-CVE-2024-42365
Alpine:v3.22asterisk20.9.2-r0ALPINE-CVE-2024-42365
Alpine:v3.23asterisk20.9.2-r0ALPINE-CVE-2024-42365
Alpine:v3.24asterisk20.9.2-r0ALPINE-CVE-2024-42365
Debian:14asterisk1:20.9.3~dfsg+~cs6.14.60671435-1DEBIAN-CVE-2024-42365
Ubuntu:22.04:LTSasteriskno fix listedUBUNTU-CVE-2024-42365
Ubuntu:24.04:LTSasteriskno fix listedUBUNTU-CVE-2024-42365
Ubuntu:25.10asteriskno fix listedUBUNTU-CVE-2024-42365
Ubuntu:26.04:LTSasteriskno fix listedUBUNTU-CVE-2024-42365
Ubuntu:26.10asteriskno fix listedUBUNTU-CVE-2024-42365

Affected products (as reported)

VendorProductVersions
asterisk asterisk < 18.24.2>= 19.0.0, < 20.9.2>= 21.0.0, < 21.4.2< 18.9-cert11>= 19.0, < 20.7-cert2

Weakness: CWE-267, CWE-1220 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

References