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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:14 | asterisk | 1:22.5.1~dfsg+~cs6.15.60671435-1 | DEBIAN-CVE-2025-1131 |
| Ubuntu:22.04:LTS | asterisk | no fix listed | UBUNTU-CVE-2025-1131 |
| Ubuntu:24.04:LTS | asterisk | no fix listed | UBUNTU-CVE-2025-1131 |
Affected products (as reported)
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