Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-57819 — Unauthenticated SQL injection to RCE exploit for FreePBX 16 Endpoint Manager (CVE-2025-57819). Demonstrates stacked queries to write a webshell via cron_jobs and escalate to root. | Kitploit
Tools/GitHubGitHub/r3vpwnx/cve-2025-57819
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationPenetration Testing
GitHubr3vpwnx/cve-2025-57819

CVE-2025-57819

Unauthenticated SQL injection to RCE exploit for FreePBX 16 Endpoint Manager (CVE-2025-57819). Demonstrates stacked queries to write a webshell via cron_jobs and escalate to root.

View Repository
3019 days agoNot yet reviewed
Share

CVE-2025-57819 - FreePBX 16 Endpoint Manager unauthenticated SQLi to RCE (PoC)

Proof-of-concept for CVE-2025-57819, an unauthenticated stacked SQL injection in the FreePBX Endpoint Manager module (admin/ajax.php, brand parameter). The injection is escalated to remote code execution by INSERTing a row into FreePBX's own cron_jobs table, so the appliance cron runner writes an attacker webshell within about 60 seconds and runs it as the asterisk user. An optional local privilege-escalation step proves root.

Affected versions

FreePBX framework < 16.0.89 (Endpoint Manager module). Confirm against the vendor advisory for the exact fixed release.

Root cause

admin/ajax.php?module=FreePBX\modules\endpoint\ajax&command=model passes the brand parameter into a SQL query without parameterization, and the driver allows stacked statements. An unauthenticated request can therefore run additional statements, including an INSERT into the cron_jobs table that FreePBX's own cron runner later executes, turning SQL injection into command execution as asterisk.

The optional root step abuses an appliance-local path: /etc/incron.d/legacy makes root run /etc/init.d/dahdi, which sources the asterisk-writable /etc/dahdi/init.conf.

Requirements

python3 -m pip install requests

Reproduction

python3 exploit.py <target> [--vhost <name>] [--scheme https] [--root] [--cmd '<shell cmd>']
FlagDescription
targetIP or hostname of the FreePBX target
--vhostHost header, if the target is name-based vhosted
--schemeURL scheme (default https)
--rootAlso run the incron/dahdi init.conf privesc and prove root
--cmdRun one command through the planted webshell and exit

Examples:

python3 exploit.py <target>
python3 exploit.py <target> --vhost pbx.example.local --root
python3 exploit.py <target> --cmd 'id'

Expected result: the script confirms the injection (leaked DB user via EXTRACTVALUE), plants the webshell, and prints id / uname -a as asterisk. With --root it appends to init.conf, triggers the dahdi restart, and prints uid=0(root) from a SUID bash.

Cleanup (the script reminds you): remove the appended line from /etc/dahdi/init.conf and delete the docroot drops (webshell, rce_sh, .rce_root_check).

Impact

Unauthenticated remote code execution as asterisk, escalating to root on a default appliance. Full compromise of the PBX host.

Severity

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (9.8) for the unauthenticated SQLi to RCE, per the NVD entry for CVE-2025-57819 (confirm against the current NVD vector).

CWE-89 (SQL injection) leading to CWE-78 (OS command execution).

References

  • NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-57819
  • https://github.com/itsC1SCO/FreePBX-SQLi-Exploit-Privilege-escalation

Disclaimer

For authorized security testing and education only. Use this only against systems you own or have explicit written permission to test. The author accepts no liability for misuse.

Author

Dilanka Kaushal Hewage (r3vpwnx)

  • Site: https://r3vpwnx.space
  • Contact: [email protected]

License

MIT - see LICENSE.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    837
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    536
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    424
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    355
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    294
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    276

Explore all tools

Browse our collection of tools

View all tools →