Vulnerability Description
FreePBX api module version 17.0.8 and prior contain a command injection vulnerability in the initiateGqlAPIProcess() function where GraphQL mutation input fields are passed directly to shell_exec() without sanitization or escaping. An authenticated user with a valid bearer token can send a GraphQL moduleOperations mutation with backtick-wrapped commands in the module field to execute arbitrary commands on the underlying host as the web server user.
CVSS Score
HIGH
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Freepbx | Api | < 17.0.8 |
Related Weaknesses (CWE)
References
- https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/ApiProduct
- https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/ApiProduct
- https://github.com/FreePBX/api/commit/5f194e39a47e5481e8947f9694304d32724175f6Patch
- https://www.vulncheck.com/advisories/freepbx-api-module-command-injection-via-grThird Party Advisory
FAQ
What is CVE-2026-40520?
CVE-2026-40520 is a vulnerability with a CVSS score of 7.2 (HIGH). FreePBX api module version 17.0.8 and prior contain a command injection vulnerability in the initiateGqlAPIProcess() function where GraphQL mutation input fields are passed directly to shell_exec() wi...
How severe is CVE-2026-40520?
CVE-2026-40520 has been rated HIGH with a CVSS base score of 7.2/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-40520?
Check the references section above for vendor advisories and patch information. Affected products include: Freepbx Api.