Vulnerability · Published Sep 23, 2025 · Assigned by Gridware

CVE-2025-1131Asterisk Unsafe Shell Sourcing in safe_asterisk Leads to Local Privilege Escalation

High 7.0

In plain English

A high-severity uncontrolled search path in Asterisk from Asterisk. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)7.0High
Exploit odds (30 days)0.2%top 87.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

A local privilege escalation vulnerability exists in the safe_asterisk script included with the Asterisk toolkit package. When Asterisk is started via this script (common in SysV init or FreePBX environments), it sources all .sh files located in /etc/asterisk/startup.d/ as root, without validating ownership or permissions. Non-root users with legitimate write access to /etc/asterisk can exploit this behaviour by placing malicious scripts in the startup.d directory, which will then execute with root privileges upon service restart.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:14asterisk1:22.5.1~dfsg+~cs6.15.60671435-1DEBIAN-CVE-2025-1131
Ubuntu:22.04:LTSasteriskno fix listedUBUNTU-CVE-2025-1131
Ubuntu:24.04:LTSasteriskno fix listedUBUNTU-CVE-2025-1131

Affected products (as reported)

VendorProductVersions
Asterisk Asterisk Asterisk <=18.26.2Asterisk <= 20.15.0Asterisk <= 21.10.0Asterisk <= 22.5.0

Weakness: CWE-427 · Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N/V:C/RE:H/U:Amber

References