CyberRota Analysis
AI-GeneratedGrav versions from 1.7.0 to 2.0.8 are vulnerable to a remote code execution flaw that allows authenticated users with create or update permissions on Flex-based directories to execute arbitrary shell commands on the server. The vulnerability arises from insufficient validation of user input in the FlexDirectory::dynamicDataField() function, which permits the execution of dangerous functions without proper restrictions. Organizations using affected Grav versions, particularly those with user-generated content or flexible directory structures, should prioritize patching to mitigate the risk of exploitation.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
Grav versions >= 1.7.0 and before 2.0.9 contain a remote code execution vulnerability. FlexDirectory::dynamicDataField() resolves blueprint data-*@: directives by calling call_user_func_array() on attacker-influenced input, validating only that the target is callable (is_callable()) without restricting dangerous functions such as exec, system, passthru, or shell_exec. Because FlexDirectory registers this handler for every Flex directory, it bypasses the validation added to Blueprint::dynamicData() in 2.0.7 (GHSA-fj2p-qj2f-74v5). Any authenticated user with create or update permission on any Flex-based directory (Flex Users, Flex Pages, Flex Objects, or custom Flex types) can execute arbitrary shell commands on the server.