What is Sangoma FreePBX?
FreePBX is the most widely deployed open-source web-based GUI for managing Asterisk, the open-source telephony engine. It is used by SMBs, enterprises, and service providers to administer VoIP PBX systems — configuring extensions, trunks, call routing, voicemail, and telephony features through a browser-based administrative interface.
Endpoint Manager is a commercial FreePBX module that handles IP phone provisioning and management. It includes functionality for testing SSH connectivity to managed endpoints — the check_ssh_connect() function in the testconnection action of the filestore module — and it is this function that contains CVE-2025-64328.
FreePBX installations are attractive targets because they sit on the public internet for remote management, have predictable admin panel paths, and are frequently deployed and forgotten with default or weak credentials in SMB environments.
Overview
CVE-2025-64328 is an OS command injection vulnerability (CVSS 7.2) in the FreePBX Endpoint Manager filestore module. An authenticated administrative user can inject arbitrary OS commands through the SSH connectivity test function, gaining command execution as the asterisk operating system user.
The vulnerability was published in November 2025, and active exploitation began within weeks. By February 27, 2026, the Shadowserver Foundation reported over 900 FreePBX instances infected with persistent EncystPHP web shells, deployed by the INJ3CTOR3 threat group — the same actor that previously exploited FreePBX CVE-2019-19006. CISA added it to the KEV catalog on February 3, 2026.
Affected Versions
| Component | Vulnerable | Fixed |
|---|---|---|
| FreePBX Endpoint Manager (filestore module) | ≥ 17.0.2.36 and < 17.0.3 | 17.0.3 |
Technical Details
The check_ssh_connect() function in the Endpoint Manager's filestore module accepts user-controlled input and interpolates it unsanitized into OS commands used to test SSH connectivity to managed endpoints. Attacker-controlled values are passed directly to a shell execution context without escaping, enabling injection of arbitrary shell commands through metacharacters (semicolons, pipes, backticks, command substitution).
Authentication is required but any admin-level account suffices. The injected commands execute as the asterisk system user, which has broad access to PBX configuration, database credentials, and the local filesystem.
CWE-78 (OS Command Injection): User-supplied input is incorporated into a command sent to an OS shell without neutralization of shell metacharacters.
The fix in 17.0.3 sanitizes the SSH test parameters before shell invocation.
Discovery
CVE-2025-64328 was discovered and reported by security researcher M. Cory Billington. FreePBX issued its security advisory and the 17.0.3 patch in November 2025.
Exploitation Context
Active exploitation began December 2025, attributed to INJ3CTOR3 — a threat group with a documented history of targeting FreePBX installations, previously responsible for exploiting CVE-2019-19006 across thousands of systems.
The group deployed the EncystPHP web shell (analyzed by Fortinet FortiGuard Labs). The dropper was delivered from 45.234.176.202. Post-compromise actions were systematic and thorough:
- Locked key system files using
chattr +i - Harvested database credentials from FreePBX configuration
- Deleted cron jobs and user accounts
- Removed rival web shells from competing attackers
- Created a root-level user and reset passwords
- Injected SSH keys for persistent access
- Ensured port 22 remained open
- Fetched additional payloads from remote servers
- Erased log files to impede forensics
- Removed the Endpoint Manager module to eliminate the vulnerability
- Deployed Base64-encoded web shells at multiple locations for redundant persistence
By February 27, 2026, the Shadowserver Foundation reported 900+ FreePBX instances with persistent EncystPHP web shells still installed — many weeks after the patch was available. Geographic concentration: United States, Brazil, Canada, Germany, France.
The INJ3CTOR3 campaign represents a clear pattern: telephony infrastructure is targeted, compromised deeply, and used as a persistent foothold rather than a transient botnet node.
Remediation
-
Upgrade Endpoint Manager to 17.0.3 via the FreePBX Module Admin interface or the
fwconsole ma upgrade endpointmanCLI command. -
Check for EncystPHP web shells — scan the FreePBX web root and admin directories for unexpected PHP files, particularly those with Base64-encoded content or obfuscated function calls. Check
/var/www/html/admin/modules/and adjacent directories. -
Audit user accounts — review
/etc/passwdand FreePBX admin users for accounts not created by your team. The INJ3CTOR3 campaign created root-level OS users. -
Check SSH authorized keys — review
/root/.ssh/authorized_keysand the asterisk user's~/.ssh/authorized_keysfor injected keys. -
Rotate database credentials — the
asteriskuser has read access to FreePBX's MySQL database which contains SIP credentials, extension configurations, and potentially other sensitive data. -
Restrict admin panel access — the FreePBX administrative interface should never be directly internet-exposed. Restrict access by IP using firewall rules or place it behind a VPN.
-
Review logs — check Apache/Nginx access logs for
POSTrequests to thefilestoremodule and unexpected requests in the/admin/ajax.phpor module-specific endpoints. Log files may have been cleared by the attacker; check filesystem modification timestamps.
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2025-64328 |
| Vendor / Product | Sangoma — FreePBX |
| NVD Published | 2025-11-07 |
| NVD Last Modified | 2026-02-24 |
| CVSS 3.1 Score | 7.2 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CWE | CWE-78 find similar ↗ |
| CISA KEV Added | 2026-02-03 |
| CISA KEV Deadline | 2026-02-24 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2025-11-07 | CVE-2025-64328 published; FreePBX Endpoint Manager 17.0.3 released with fix; researcher M. Cory Billington credited |
| 2025-12-01 | INJ3CTOR3 threat group begins active exploitation; EncystPHP web shell deployed |
| 2026-02-03 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2026-02-24 | CISA BOD 22-01 remediation deadline |
| 2026-02-27 | Shadowserver Foundation reports 900+ FreePBX instances with persistent EncystPHP web shells |
References
| Resource | Type |
|---|---|
| NVD — CVE-2025-64328 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |
| GitHub Advisory GHSA-vm9p-46mv-5xvw — FreePBX Endpoint Manager OS Command Injection | Vendor Advisory |
| Fortinet FortiGuard Labs: Unveiling the Weaponized EncystPHP Web Shell | Security Research |
| The Hacker News: 900+ Sangoma FreePBX Instances Infected with Web Shells | Security Research |
| SecurityWeek: 900 Sangoma FreePBX Instances Infected with Web Shells | Security Research |