CVE-2025-66294: getgrav/grav · Grav is vulnerable to RCE via SSTI through Twig Sandbox Bypass
Affects getgrav/gravSource GCVE Database
Public exploit available (Metasploit) · CVSS 8.7 High : upgrade to 1.8.0-beta.27 as a priority.
Data as of 21 Nov 2026, 03:47 UTC
- Patch
- Available – fixed in 1.8.0-beta.27
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 1 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 20 Nov 2026.
What to do
Upgrade getgrav/grav to 1.8.0-beta.27.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Packagistgetgrav/grav | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available and the vulnerability is fixed in Grav version 1.8.0-beta.27. Users should upgrade to this version or later to remediate the issue. Since the vulnerability involves weak sanitization in the cleanDangerousTwig method, upgrading ensures the sanitization properly blocks dangerous Twig functions. No additional mitigations are specified by the vendor advisory. Users should also review form configurations and permissions to limit exposure.
Description
Grav CMS versions prior to 1.8.0-beta.27 contain a Server-Side Template Injection (SSTI) vulnerability (CVE-2025-66294) that allows authenticated users with editor permissions to execute arbitrary commands on the server. This vulnerability arises from weak regex sanitization in the cleanDangerousTwig method, which fails to block nested function calls in Twig templates. Under certain conditions, unauthenticated attackers may also exploit this if a vulnerable form exists that processes user input through evaluate_twig. The flaw enables bypassing of sanitization and execution of arbitrary payloads via crafted form messages.