Impact
The vulnerability allows an attacker to execute arbitrary PHP code on the web server. In Grav versions up to 2.0.17, the Twig sort filter calls a wrapper that ignores sandbox restrictions, permitting the use of plain function names such as spl_autoload. Because spl_autoload performs a PHP include, the attacker can craft a payload that causes the filter to execute code supplied by the attacker, resulting in full remote code execution as the web server user.
Affected Systems
The affected product is the Grav CMS. Versions up to and including 2.0.17 are impacted. The product vendor is getgrav, with the main product name Grav. Versions 2.0.18 and 2.0.19 or newer are not affected.
Risk and Exploitability
The CVSS score of 8.7 indicates high severity. No EPSS data is available, so the likelihood of exploitation cannot be quantified but the vulnerability requires an authenticated user with page‑write privileges, such as those granted the admin.pages or api.pages.write role. The exploit can be delivered through a crafted payload passed to the sort filter, for example via front‑matter in the Email plugin's form. The vulnerability is not currently listed in CISA's KEV catalog.
OpenCVE Enrichment