Remote Code Execution in Grav via Blueprint dynamicData
An attacker with administrative page-editing permissions can achieve remote code execution in Grav versions prior to 2.0.7 by injecting arbitrary callables into page frontmatter, which are subsequently triggered by visitor requests.
CVE search metadata
CVE search record: CVE-2026-64850. EPSS: 0.34%. KEV: no. Product: Grav (< 2.0.7). Brief: Remote Code Execution in Grav via Blueprint dynamicData. Brief link: https://feed.craftedsignal.io/briefs/2026-09-grav-rce/
Grav CMS versions prior to 2.0.7 are susceptible to a remote code execution (RCE) vulnerability identified as CVE-2026-64850. The vulnerability stems from the Blueprint::dynamicData() method, which performs insufficient validation on class method inputs. Specifically, the application uses call_user_func_array() with input derived from page frontmatter without implementing an allowlist.
An attacker with admin.pages or api.pages.write permissions can craft a malicious page configuration that designates Grav\Common\Utils::arrayFilterRecursive as a callable to execute system-level commands. Because the frontmatter is processed when a page is rendered, the payload executes with the privileges of the web-server user whenever a visitor (including unauthenticated users) requests the page. This vulnerability effectively escalates a compromise of administrative page-editing rights to full system-level code execution on the underlying server.
Attack Chain
- Attacker obtains valid
admin.pagesorapi.pages.writepermissions, likely via compromised administrative credentials. - Attacker logs into the Grav administrative interface and navigates to the page creation or editing module.
- Attacker crafts a custom page containing malicious YAML frontmatter, specifically targeting the form plugin's field definitions.
- Attacker inserts a
data-opts@directive into the frontmatter, pointing toGrav\Common\Utils::arrayFilterRecursiveas the callable. - Attacker embeds the target system command (e.g.,
id) within the frontmatter payload, passing it as the primary argument to the function. - Attacker saves the page configuration to the Grav CMS data store.
- Attacker (or any subsequent visitor) triggers a GET request to the path corresponding to the malicious page.
- Grav CMS processes the page frontmatter, invokes the malicious callable via
dynamicData(), and executes the command on the web server.
Impact
Successful exploitation results in arbitrary remote code execution on the host server under the context of the web-server user (e.g., www-data or apache). This allows for full system control, potential data exfiltration, or lateral movement within the hosting environment. Any user with page-editing privileges can turn a legitimate site into a persistent execution platform that triggers malicious commands upon every page view.
Recommendation
- Upgrade all Grav CMS installations to version 2.0.7 or later to address the insecure
call_user_func_arrayinvocation inBlueprint.php. - Audit current administrative accounts for
admin.pagesorapi.pages.writepermissions to ensure they are restricted to authorized personnel only. - Implement monitoring for POST requests to the Grav admin interface followed by anomalous GET requests to newly created or modified pages that may indicate payload testing.
- Review system-level web server logs for suspicious process execution (e.g.,
id,whoami,curl,wget) originating from the web server process user.
Immediate actions
Upgrade Grav CMS to version 2.0.7 or later
Mitigations
Upgrade to Grav 2.0.7
CVE-2026-64850