Skip to main content
VulnerabilityPublished

CVE-2025-66294: getgrav/grav · Grav is vulnerable to RCE via SSTI through Twig Sandbox Bypass

Affects getgrav/gravSource GCVE Database

0
Compare
Authoritative record:CVE-2025-66294· High 8.7

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

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 1 Dec 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: evidence found.

    1 Metasploit module

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Packagistgetgrav/gravAffected
  • <1.8.0-beta.27
Fixed in
  • 1.8.0-beta.27

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.

References

Community reviews

Loading reviews…