{"id":"CVE-2026-40520","state":"PUBLISHED","title":"FreePBX api module Command Injection via GraphQL","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.","publishedAt":"2026-04-21T12:41:05.281Z","updatedAt":"2026-09-24T14:17:37.983Z","severity":{"score":8.6,"label":"High","version":"4.0","vector":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["FreePBX api"],"affected":[{"vendor":"FreePBX","product":"api","packageURL":"pkg:github/FreePBX/api","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"17.0.8","versionType":"semver"},{"version":"5f194e39a47e5481e8947f9694304d32724175f6","status":"unaffected","versionType":"git"}],"repo":"https://github.com/FreePBX/api"}],"references":["https://github.com/FreePBX/api/commit/5f194e39a47e5481e8947f9694304d32724175f6","https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/Api.class.php#L546C1-L554C3","https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/ApiGqlHelper.class.php#L34C1-L36C136","https://www.vulncheck.com/advisories/freepbx-api-module-command-injection-via-graphql"],"weaknesses":["CWE-78"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/40xxx/CVE-2026-40520.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-40520","state":"PUBLISHED","datePublished":"2026-04-21T12:41:05.281Z","dateUpdated":"2026-09-24T14:17:37.983Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-04-13T20:29:02.810Z"},"containers":{"cna":{"title":"FreePBX api module Command Injection via GraphQL","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"FreePBX","product":"api","packageURL":"pkg:github/FreePBX/api","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"17.0.8","versionType":"semver"},{"version":"5f194e39a47e5481e8947f9694304d32724175f6","status":"unaffected","versionType":"git"}],"repo":"https://github.com/FreePBX/api"}],"references":[{"url":"https://github.com/FreePBX/api/commit/5f194e39a47e5481e8947f9694304d32724175f6","tags":["patch"]},{"url":"https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/Api.class.php#L546C1-L554C3","tags":["related"]},{"url":"https://github.com/FreePBX/api/blob/5f194e39a47e5481e8947f9694304d32724175f6/ApiGqlHelper.class.php#L34C1-L36C136","tags":["related"]},{"url":"https://www.vulncheck.com/advisories/freepbx-api-module-command-injection-via-graphql","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"HIGH","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.6,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"HIGH","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseSeverity":"HIGH","baseScore":7.2,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-78","lang":"en","description":"CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-09-24T14:17:37.983Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:freepbx:api:*:*:*:*:*:*:*:*","versionEndIncluding":"17.0.8"}]}]}],"credits":[{"lang":"en","value":"M. Cory Billington of theyhack.me","type":"finder"}],"source":{"discovery":"INTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.1"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-21T13:31:32.268711Z","id":"CVE-2026-40520","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-21T13:32:06.116Z"}}]}}}