Skip to content
OpenAdvisories
High · 7.0 CVE-2025-1131 EUVD-2025-30828

Asterisk Unsafe Shell Sourcing in safe_asterisk Leads to Local Privilege Escalation

Published Sep 23, 2025 · Updated Feb 26, 2026 · Assigned by Gridware

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 products

VendorProductAffectedFixed
Asterisk Asterisk Asterisk <=18.26.2, Asterisk <= 20.15.0, Asterisk <= 21.10.0, Asterisk <= 22.5.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 asterisk 1:22.5.1~dfsg+~cs6.15.60671435-1 —
Debian 11 asterisk 1:16.28.0~dfsg-0+deb11u8 DLA-4326-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS asterisk No fix yet —
Ubuntu 22.04 LTS asterisk No fix yet —
Ubuntu 20.04 LTS asterisk No fix yet —
Ubuntu 18.04 LTS asterisk No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS asterisk No fix yet —

Advisories 2

References