CVE-2025-66294CWE-1336CWE-94code-injection

CVE-2025-66294

High ยท published December 2, 2025

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

๐Ÿšจ A sneaky Server-Side Template Injection (SSTI) vulnerability lurks in Grav, allowing even authenticated users with editor permissions to execute arbitrary commands! ๐Ÿ”ฅ Think of it like a restaurant where the chef is granted access to not just the kitchen but also the safe where all the secrets are stored. If the chef were to forget to check the ingredients properly, they could accidentally cook up a recipe that opens the vault! An attacker could exploit this vulnerability to unleash chaos on the server โ€” imagine altering files or even gaining unauthorized access to sensitive data. With the right commands, they could compromise the entire system, leading to a catastrophic loss of trust and integrity.

Put simply

Think of it like a restaurant where the chef is granted access to not just the kitchen but also the safe where all the secrets are stored. If the chef were to forget to check the ingredients properly, they could accidentally cook up a recipe that opens the vault! This SSTI vulnerability arises from weak regex validation within Grav's cleanDangerousTwig method, allowing authenticated users to inject and execute arbitrary code on the server.

What to do

An attacker could exploit this vulnerability to unleash chaos on the server โ€” imagine altering files or even gaining unauthorized access to sensitive data. With the right commands, they could compromise the entire system, leading to a catastrophic loss of trust and integrity. Immediately update Grav to version 1.8.0-beta.27 to close this exploit. Additionally, review user permissions to minimize risks and enforce stricter regex validation to prevent similar vulnerabilities in the future. You've got this! With these steps, you'll be back to securing your server like the hero you are! ๐Ÿ›ก๏ธ

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.02818 ยท 86.5th percentile
Weaknesses
CWE-1336 ยท Improper Neutralization of Special Elements Used in a Template Engine; CWE-94 ยท Improper Control of Generation of Code ('Code Injection')
Published
2025-12-02T02:15Z
Affected products (27)
ProductVersionsFixed in
getgrav/gravโ‰ฅ 1.7.48, < 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โ€”
getgrav/gravall versionsโ€”
getgrav/gravall versionsโ€”
References (2)
EPSS history
Timeline
  • 01 DEC 20:52Z
    Grav is vulnerable to RCE via SSTI through Twig Sandbox Bypass
    cvelistv5