CVE-2025-62173 Overview
CVE-2025-62173 is an authenticated SQL injection vulnerability in the FreePBX Endpoint Module REST API. The flaw is tracked under CWE-89 and allows authenticated attackers with high privileges to inject arbitrary SQL statements through the REST API. Successful exploitation can compromise the confidentiality and integrity of the underlying database, and may impact service availability. The vulnerability is exploitable over the network and requires no user interaction. FreePBX maintainers disclosed the issue through a GitHub Security Advisory.
Critical Impact
Authenticated attackers can manipulate database queries through the Endpoint Module REST API, exposing call records, credentials, and configuration data stored in the FreePBX database.
Affected Products
- FreePBX Endpoint Module
- FreePBX REST API components dependent on the Endpoint Module
- Sangoma-managed FreePBX deployments using vulnerable Endpoint Module versions
Discovery Timeline
- 2025-12-04 - CVE-2025-62173 published to NVD
- 2026-04-15 - Last updated in NVD database
Technical Details for CVE-2025-62173
Vulnerability Analysis
The vulnerability resides in the FreePBX Endpoint Module REST API, which exposes endpoints used to provision and manage VoIP handsets. One or more API handlers incorporate user-supplied input directly into SQL queries without proper parameterization or escaping. An authenticated user with sufficient API privileges can craft requests that alter query semantics, enabling data extraction or modification. Because the Endpoint Module typically stores device credentials, MAC addresses, and provisioning data, exploitation directly exposes infrastructure secrets. The issue is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command. The attack is network-reachable wherever the FreePBX administrative interface or REST API is exposed.
Root Cause
The root cause is insufficient input sanitization in REST API handlers within the Endpoint Module. Input parameters are concatenated into SQL statements instead of being passed through parameterized queries or an ORM with bound parameters. Any string-based filter, identifier, or search field that reaches the database layer without neutralization becomes an injection point.
Attack Vector
An attacker first obtains valid high-privilege credentials on the FreePBX system. The attacker then issues crafted HTTP requests to the vulnerable Endpoint Module REST API routes, embedding SQL metacharacters such as quotes, comments, and UNION clauses inside parameters that flow into database queries. The injected payload executes in the context of the FreePBX database user, returning sensitive rows or modifying stored records. Refer to the GitHub Security Advisory for advisory-specific technical detail.
Detection Methods for CVE-2025-62173
Indicators of Compromise
- Unexpected HTTP requests to FreePBX Endpoint Module REST API routes containing SQL metacharacters such as ', --, UNION SELECT, or INFORMATION_SCHEMA references.
- Database error messages or unusually large response bodies returned from Endpoint Module API endpoints.
- Authenticated API sessions originating from unusual source IPs or accessing endpoints outside normal provisioning workflows.
- New or modified rows in Endpoint Module tables that do not correspond to legitimate provisioning activity.
Detection Strategies
- Inspect FreePBX web server access logs for REST API requests containing encoded or raw SQL syntax in query parameters or JSON bodies.
- Enable MySQL or MariaDB general query logging temporarily to identify malformed or anomalous statements originating from the Endpoint Module.
- Correlate authentication logs with API request patterns to identify privileged accounts issuing abnormal volumes of endpoint queries.
Monitoring Recommendations
- Forward FreePBX Apache and database logs to a central log platform for retention and query.
- Alert on HTTP 500 responses or syntax-error patterns returned from /admin/api/ and Endpoint Module routes.
- Track changes to administrator accounts and API tokens that could be used to satisfy the authentication requirement.
How to Mitigate CVE-2025-62173
Immediate Actions Required
- Apply the patched FreePBX Endpoint Module version referenced in the GitHub Security Advisory GHSA-q3h9-fmpr-vpfw.
- Restrict access to the FreePBX administrative interface and REST API to trusted management networks only.
- Rotate administrator passwords, API tokens, and SIP device secrets that may have been exposed.
- Audit recent Endpoint Module API activity for signs of exploitation prior to patching.
Patch Information
FreePBX has published a security advisory and corresponding fix for the Endpoint Module. Administrators should update through the FreePBX Module Admin interface or fwconsole ma upgrade endpoint once the patched release is available. Consult the FreePBX Security Advisory for the specific fixed version.
Workarounds
- Disable the Endpoint Module REST API if it is not required for operations until patching is complete.
- Place the FreePBX administrative interface behind a VPN or IP allowlist to prevent reachability from untrusted networks.
- Reduce the number of accounts holding the high privileges required to invoke the affected API routes.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

