# CVE-2026-40520: FreePBX api module Command Injection via GraphQL

- Severity: High 8.6 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.43%, higher than 73% of CVEs (2026-12-01)
- Published: 2026-04-21T12:41:05.281Z
- Modified: 2026-10-26T21:10:00.170Z
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- FreePBX api: up to 17.0.8; before 17.0.8 (not affected: 5f194e39a47e5481e8947f9694304d32724175f6)

## Every score

- VulnCheck: CVSS:4.0 8.6 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/FreePBX/api/commit/5f194e39a47e5481e8947f9694304d32724175f6> (patch)
- <https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/Api.class.php#L546C1-L554C3> (product, related)
- <https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/ApiGqlHelper.class.php#L34C1-L36C136> (product, related)
- <https://www.vulncheck.com/advisories/freepbx-api-module-command-injection-via-graphql> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-40520](https://www.cve.org/CVERecord?id=CVE-2026-40520), CVE Terms of Use, modified 2026-09-24
- NVD: [CVE-2026-40520](https://nvd.nist.gov/vuln/detail/CVE-2026-40520), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-40520 · Whole record: https://cve.day/CVE-2026-40520.json · Rebuilt by cve.day 2026-11-25T22:59:19.091Z
