CVE-2025-66297CWE-1336

CVE-2025-66297

High Β· published December 2, 2025

CVSS v3.1
8.8
EPSS
1%
Percentile
55.6
In the wild
Unconfirmed
What it is

⚑ A crafty little feature allows admin users to inject Twig code, turning a harmless content management tool into a playground for privilege escalation and remote code execution! πŸ”₯ Think of this like a restaurant where the chef accidentally leaves the recipe book open. Any waiter (admin user) can add their own "special dishes" (malicious code) to the menu, leading to some dangerous meals being served! An attacker with admin access could elevate their privileges to full control or execute any command on the server, jeopardizing the entire site’s security. This means they could change settings, access sensitive data, or potentially wreak havoc on the system – a recipe for disaster!

Put simply

Think of this like a restaurant where the chef accidentally leaves the recipe book open. Any waiter (admin user) can add their own "special dishes" (malicious code) to the menu, leading to some dangerous meals being served! This vulnerability allows users with admin panel access to enable Twig processing in the page frontmatter, enabling them to inject malicious Twig expressions that can escalate privileges or execute arbitrary commands through the scheduler API.

What to do

An attacker with admin access could elevate their privileges to full control or execute any command on the server, jeopardizing the entire site’s security. This means they could change settings, access sensitive data, or potentially wreak havoc on the system – a recipe for disaster! Immediately update to Grav version 1.8.0-beta.27 or later to patch this vulnerability. Review permissions carefully to ensure that only trusted users have admin access. Monitor your system for any unusual activity as a precaution. You've got this! By following these steps, you're on your way to securing your Grav CMS like a pro! πŸ›‘οΈ

The record
Technical detail
CVSS v3.1
8.8 Β· HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00783 Β· 55.6th percentile
Weakness
CWE-1336 Β· Improper Neutralization of Special Elements Used in a Template Engine
Published
2025-12-02T02:15Z
Affected products (27)
ProductVersionsFixed in
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/grav< 1.8.01.8.0
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
References (2)
EPSS history
Timeline
  • 01 DEC 21:05Z
    Grav vulnerable to Privilege Escalation and Authenticated Remote Code Execution via Twig Injection
    cvelistv5