CVE-2025-1131: Asterisk Unsafe Shell Sourcing in safe_asterisk Leads to Local Privilege Escalation
CVE-2025-1131 affects 206 listed versions of Sangoma Asterisk in the Dawnsentry catalogue.
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
206 of 250 listed versions are affected. Fixed in 22.5.1, 21.10.1, 20.15.1, 18.26.3. The newest release, 24.0.0, is not affected.
22.5.0 22.4.1 22.4.0 22.3.0 22.2.0 22.1.1 22.1.0 22.0.0 22.0.0-rc2 22.0.0-rc1 21.10.0 21.9.1 21.9.0 21.8.0 21.7.0 21.6.1 21.6.0 21.5.0 21.4.3 21.4.2 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.15.0 20.14.1 20.14.0 20.13.0 20.12.0 20.11.1 20.11.0 20.10.0 20.9.3 20.9.2 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 and 146 more
What it is
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.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD)
Published by Gridware on 23 September 2025. Last changed 19 October 2026.
Sources
Check one version you run: look CVE-2025-1131 up, or pick a product and version in the quick lookup.
Updated 1 December 2026.