CVE-2026-40520: FreePBX api · OS Command Injection
Affects FreePBX apiSource CVE Database V5
Not known to be exploited · CVSS 8.6 High.
Data as of 30 Oct 2026, 11:52 UTC
- EPSS
- 1.3% chance of exploitation in 30 days – higher than 72% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 21 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| FreePBXapi | Affected
| Fixed in– |
GitHubapipkg:github/apiOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Until an official fix is available, restrict access to the FreePBX api module to trusted users only and monitor for suspicious activity. Avoid exposing the API to untrusted networks. Follow vendor updates closely for any released patches or official mitigations.
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.
References
- github.com/FreePBX/api/commit/5f194e39a47e5481e8947f9694304d32724175f6 (opens in a new tab)
- github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/Api.class.php (opens in a new tab)
- github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/ApiGqlHelper.class.php (opens in a new tab)
- vulncheck.com/advisories/freepbx-api-module-command-injection-via-graphql (opens in a new tab)