Command Injection Risk in FreePBX API Module Affects Multiple Users
CVE-2026-40520
8.6HIGH
What is CVE-2026-40520?
A command injection vulnerability exists in the FreePBX API module, specifically in the initiateGqlAPIProcess() function. The issue arises from the handling of GraphQL mutation input fields passed directly to shell_exec() without proper sanitization or escaping. This allows an authenticated attacker, equipped with a valid bearer token, to manipulate GraphQL moduleOperations mutations. By wrapping commands in backticks within the module field, an attacker can execute arbitrary commands on the host system using the web server user's privileges. Users are advised to apply the latest patches to mitigate this risk.
Affected Version(s)
api 0 <= 17.0.8
api 5f194e39a47e5481e8947f9694304d32724175f6
