Executive brief
Grav, a popular open-source content management system, contains a vulnerability that allows certain authorized users to take full control of the web server. By saving a specially crafted page, an attacker with page-editing permissions can force the server to execute malicious commands. These commands are triggered automatically whenever any visitor, including members of the public, views the affected page, potentially leading to a total compromise of the website and its data.
Technical details
A remote code execution (RCE) vulnerability exists in Grav's Blueprint::dynamicData() method within system/src/Grav/Common/Data/Blueprint.php. The function passes a Class::method callable string and its arguments directly to call_user_func_array() without an allowlist. Because the Grav Form plugin routes page frontmatter through this path, an authenticated user with 'admin.pages' or 'api.pages.write' permissions can inject a malicious callable directive (such as system()) into a page's frontmatter. Once planted, the payload executes with the privileges of the web-server user whenever the page is requested, even by unauthenticated visitors. The issue is resolved in version 2.0.7.
Affected products
- getgrav Grav >= 2.0.4, < 2.0.7
Timeline
- 2026-07-07: advisory: GitHub Security Advisory published
- 2026-07-21: disclosed: CVE published to NVD
- 2026-07-21: patched: Fix released in version 2.0.7