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

CVE-2025-66299

High Β· published December 2, 2025

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

⚑ A crafty template injection lurks in Grav CMS! Prior to version 1.8.0-beta.27, authenticated editors could execute arbitrary code on the server like a magician pulling rabbits from a hat! πŸŽ©πŸ‡ Think of it as a restaurant where an editor can sneak a hidden recipe into the menu, allowing them to add anything they want to the kitchen's offerings without anyone noticing. The Twig sandbox is like a chef's way of checking what gets in, but it’s been bypassed! This vulnerability is a high-stakes game: an authenticated editor can manipulate the server by executing any code, potentially compromising the entire system. Imagine a rogue chef not only serving strange dishes but also reprogramming the restaurant's entire menu! The consequences could range from data theft to complete system takeover.

Put simply

Think of it as a restaurant where an editor can sneak a hidden recipe into the menu, allowing them to add anything they want to the kitchen's offerings without anyone noticing. The Twig sandbox is like a chef's way of checking what gets in, but it’s been bypassed! Grav CMS is vulnerable to Server-Side Template Injection (SSTI) due to insufficient protection of the Twig object inside its security sandbox. This flaw allows authenticated users with editor permissions to inject malicious Twig template directives, enabling arbitrary code execution.

What to do

This vulnerability is a high-stakes game: an authenticated editor can manipulate the server by executing any code, potentially compromising the entire system. Imagine a rogue chef not only serving strange dishes but also reprogramming the restaurant's entire menu! The consequences could range from data theft to complete system takeover. To protect your site, upgrade to Grav CMS version 1.8.0-beta.27 immediately. Review user permissions to ensure that only trusted individuals have editor access. Regularly audit Twig templates to catch potentially harmful directives before they can be executed. You've got this! Update today, secure your system, and wear that security hero badge with pride! πŸ›‘οΈ

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.00608 Β· 48.4th 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-02T03:15Z
Affected products (27)
ProductVersionsFixed in
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β€”
getgrav/gravall versionsβ€”
getgrav/gravall versionsβ€”
References (2)
EPSS history
Timeline
  • 01 DEC 21:15Z
    Security Sandbox Bypass with SSTI (Server Side Template Injection) in the Grav CMS
    cvelistv5