Summary
An authenticated local privilege escalation exists in the deprecated FreePBX startup script amportal.
Details
In the deprecated amportal utility, the lookup for the freepbx_engine file occurs in /etc/asterisk/ directories. Typically, these are configured by FreePBX as writable by the asterisk user and any members of the asterisk group. This means that a member of the asterisk group can add their own freepbx_engine file in /etc/asterisk/ and upon amportal executing, it would exec that file with root permissions (even though the file was created and placed by a non-root user)
Mitigation
- Confirm only trusted local OS system users are members of the
asterisk group.
- Look for suspicious files in the
/etc/asterisk/ directory (via Admin -> Config Edit in the GUI, or via CLI).
- Double-check that
live_dangerously = no is set (or unconfigured, as the default is no) in /etc/asterisk/asterisk.conf file.
- Eliminate any unsafe custom use of Asterisk dial plan applications and functions that potentially can manipulate the file system, e.g., System(), FILE(), etc.
Scoring
CVSS 4.0 Base vector string: CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 4.0 more complete vector string: CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/RE:L/U:Green
Current CVSS v4.0 Base score is 8.6 (High)
Current CVSS v4.0 more complete score is 5.7 (Medium)
Alternative CVSS v4.1 score is 0.9 (Low)
See details on scoring on the FreePBX blog at https://www.freepbx.org/watch-what-we-do-with-security-fixes-%f0%9f%91%80/
Summary
An authenticated local privilege escalation exists in the deprecated FreePBX startup script
amportal.Details
In the deprecated
amportalutility, the lookup for thefreepbx_enginefile occurs in/etc/asterisk/directories. Typically, these are configured by FreePBX as writable by the asterisk user and any members of the asterisk group. This means that a member of the asterisk group can add their ownfreepbx_enginefile in/etc/asterisk/and uponamportalexecuting, it would exec that file with root permissions (even though the file was created and placed by a non-root user)Mitigation
asteriskgroup./etc/asterisk/directory (via Admin -> Config Edit in the GUI, or via CLI).live_dangerously = nois set (or unconfigured, as the default is no) in/etc/asterisk/asterisk.conffile.Scoring
CVSS 4.0 Base vector string:
CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NCVSS 4.0 more complete vector string:
CVSS:4.0/AV:L/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/RE:L/U:GreenCurrent CVSS v4.0 Base score is 8.6 (High)
Current CVSS v4.0 more complete score is 5.7 (Medium)
Alternative CVSS v4.1 score is 0.9 (Low)
See details on scoring on the FreePBX blog at https://www.freepbx.org/watch-what-we-do-with-security-fixes-%f0%9f%91%80/