Rapid7

module

FreePBX ajax.php unauthenticated SQLi to RCE

Disclosed
Aug 28, 2025
Created
Sep 23, 2025

Description

This module exploits an unauthenticated SQL injection flaw in FreePBX prior to versions 15.0.66, 16.0.89,
and 17.0.3. The vulnerability lies in the /admin/ajax.php endpoint, which is accessible without
authentication. Additionally, the database user created by FreePBX can schedule cronjobs, allowing
remote code execution on the target system.

Authors

Echo_Slow
Piotr Bazydlo
Sonny

Platform

Linux

Architectures

cmd

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use exploit/unix/http/freepbx_unauth_sqli_to_rce
msf exploit(freepbx_unauth_sqli_to_rce) > show targets
...targets...
msf exploit(freepbx_unauth_sqli_to_rce) > set TARGET < target-id >
msf exploit(freepbx_unauth_sqli_to_rce) > show options
...show and set options...
msf exploit(freepbx_unauth_sqli_to_rce) > exploit

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.