CVE-2026-40520
FreePBX api module version 17.0.8 and prior contain a command …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/Api.class.php#L546C1-
- github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/ApiGqlHelper.class.ph
- github.com/FreePBX/api/commit/5f194e39a47e5481e8947f9694304d32724175f6
- www.vulncheck.com/advisories/freepbx-api-module-command-injection-via-graphql
- nvd.nist.gov/vuln/detail/CVE-2026-40520
- cve.org/CVERecord?id=CVE-2026-40520
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.