Technical impact
Grav versions 2.0.0 up to 2.2.18 contain a flaw that allows a page editor to escape the Twig sandbox by sending a request with a Host header of 'pages'. This vulnerability enables the attacker to write configuration YAML files in page folders and media .meta.yaml sidecars, register an unsandboxed Twig namespace, and execute arbitrary shell commands as the web server user. The weakness is identified as CWE‑15, an Improper Access Control issue, and the impact is the ability to run code on the server. The description does not explicitly state whether authentication is required, but the requirement for page editor privileges is implied.
Affected Systems
The affected system is Grav, released under the getgrav:grav vendor. Versions 2.0.0 through any release prior to 2.2.18 are vulnerable. No specific patch versions are listed beyond the latest 2.2.18. The vulnerability affects all deployments of these versions, regardless of operating system, as it is a server‑side issue within Grav's processing of HTTP requests.
Risk and Exploitability
The CVSS score of 8.7 indicates high severity. The EPSS score is not available, so the current probability of exploitation is unknown, and the vulnerability is not listed in CISA KEV, suggesting it is not a known, actively exploited weakness. The likely attack vector is a remote HTTP request with a crafted Host header, meaning the vulnerability can be triggered by any user who can send such a request to the Grav instance, including unauthenticated users with access to the web server. Because the flaw grants the ability to run arbitrary shell commands, the risk is significant, making immediate remediation prudent.