{
  "id": "CVE-2026-40520",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-40520",
  "published_at": "2026-04-21T12:41:05.281Z",
  "title": "FreePBX api module Command Injection via GraphQL",
  "vendor": "FreePBX",
  "product": "api",
  "cvss": {
    "score": 8.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "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.",
  "cwe": "CWE-78",
  "cpes": [
    "cpe:2.3:a:freepbx:api:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 8.6,
    "nvd": 8.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "FreePBX",
        "product": "api",
        "ranges": [
          "\u003c= 17.0.8"
        ],
        "fixed_in": [
          "5f194e39a47e5481e8947f9694304d32724175f6"
        ]
      }
    ],
    "upgrade": [
      "Upgrade api to 5f194e39a47e5481e8947f9694304d32724175f6 or later."
    ],
    "references": [
      {
        "kind": "Patch",
        "url": "https://github.com/FreePBX/api/commit/5f194e39a47e5481e8947f9694304d32724175f6"
      }
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
