RCE in Freepbx API

CVE-2026-40520

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.

Vulnerability class: Command Injection (OS Command Injection)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 7.2 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H.

EPSS exploit prediction

EPSS: 0.024 (83.5th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 84th percentile — 83.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2026-40520: rose from 0.014 to 0.024.

EPSS over last 30 days · oldest: 0.014 · newest: 0.024 · change: +0.010

Affected products

  • Freepbx API — versions 0, 5f194e39a47e5481e8947f9694304d32724175f6

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-40520?
CVE-2026-40520 is a high-severity vulnerability in Freepbx API, classified under OS Command Injection. CVSS score: 7.2/10. Published 2026-04-21.
How severe is CVE-2026-40520?
High severity. CVSS v3 base score is 7.2 out of 10.