{"id":"CVE-2025-1131","aliases":["CVE-2025-1131"],"related":[],"kind":"vulnerability","state":"published","title":"Asterisk Unsafe Shell Sourcing in safe_asterisk Leads to Local Privilege Escalation","summary":"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.\n\n\nNon-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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\n\nNon-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.","source":"cvelist"},{"lang":"es","text":"Una vulnerabilidad de escalada de privilegios local existe en el script safe_asterisk incluido con el paquete de herramientas de Asterisk. Cuando Asterisk se inicia a través de este script (común en entornos SysV init o FreePBX), carga todos los archivos .sh ubicados en /etc/asterisk/startup.d/ como root, sin validar la propiedad o los permisos.\n\nUsuarios no-root con acceso de escritura legítimo a /etc/asterisk pueden explotar este comportamiento colocando scripts maliciosos en el directorio startup.d, los cuales se ejecutarán entonces con privilegios de root al reiniciar el servicio.","source":"nvd"}],"published":"2025-09-23T04:31:02.784Z","modified":"2026-10-19T16:10:00.260Z","severity":{"scorer":"Gridware","scheme":"CVSS:4.0","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","score":7,"rating":"HIGH"},"severities":[{"scorer":"Gridware","scheme":"CVSS:4.0","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","score":7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-427"],"affected":[{"ranges":[{"type":"custom","version":"Asterisk <=18.26.2","status":"affected"},{"type":"custom","version":"Asterisk <= 20.15.0","status":"affected"},{"type":"custom","version":"Asterisk <= 21.10.0","status":"affected"},{"type":"custom","version":"Asterisk <= 22.5.0","status":"affected"}],"vendor":"Asterisk","product":"Asterisk","repo":"https://github.com/asterisk/asterisk","platforms":["Linux","MacOS"],"source":"cvelist"},{"ranges":[{"status":"affected","fixed":"18.26.3"},{"status":"affected","introduced":"20.0.0","fixed":"20.15.1"},{"status":"affected","introduced":"21.0.0","fixed":"21.10.1"},{"status":"affected","introduced":"22.0.0","fixed":"22.5.1"}],"vendor":"sangoma","product":"asterisk","cpe":"cpe:2.3:a:sangoma:asterisk:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"18.9"},{"status":"affected","version":"20.7"},{"status":"affected","version":"20.7"},{"status":"affected","version":"20.7"},{"status":"affected","version":"20.7"},{"status":"affected","version":"20.7"},{"status":"affected","version":"20.7"},{"status":"affected","version":"20.7"},{"status":"affected","version":"20.7"}],"vendor":"sangoma","product":"certified_asterisk","cpe":"cpe:2.3:a:sangoma:certified_asterisk:18.9:cert1:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/asterisk/asterisk/security/advisories/GHSA-v9q8-9j8m-5xwp","tags":["exploit","vendor-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00006.html","tags":[],"sources":["cvelist","nvd"]}],"credits":["Abdul Mhanni"],"assigner":"Gridware","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-09-24T03:55:15.207Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-1131","url":"https://www.cve.org/CVERecord?id=CVE-2025-1131","licence":"CVE Terms of Use","modified":"2026-02-26T17:48:19.381Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-1131","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-1131","licence":"Public domain","modified":"2026-10-19T16:10:00.260Z"}],"updatedAt":"2026-11-25T22:59:05.025Z","epss":{"score":0.00218,"percentile":0.13,"date":"2026-12-01T12:00:22.000Z"}}