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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | asterisk | No fix yet | — |
Advisories 2
- WID-SEC-2025-1697 Asterisk: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 12, 2026
- DLA-4326-1 asterisk - security update Debian Security (DSA / DLA) · Oct 10, 2025